Created
June 22, 2021 11:23
-
-
Save bjornmicallef/202972aa3ccbed98840888ac3d978ac2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void ConfigureServices(IServiceCollection services) | |
{ | |
services.AddControllers(); | |
services.AddMemoryCache(); | |
services.AddSingleton<IConnectionMultiplexer>(provider => ConnectionMultiplexer.Connect("your redis connection string")); | |
services.AddScoped<ICacheService, CacheService>(); | |
services.AddScoped<IWeatherService, WeatherService>(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment