From f09b4589caa75a96e0361a452cdd1e3103747608 Mon Sep 17 00:00:00 2001 From: Daniel Gyulai Date: Sun, 22 Nov 2020 00:31:25 +0100 Subject: [PATCH] Bugfix in Startup --- CoviDok/Startup.cs | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/CoviDok/Startup.cs b/CoviDok/Startup.cs index bc2c283..3a9e3ac 100644 --- a/CoviDok/Startup.cs +++ b/CoviDok/Startup.cs @@ -19,16 +19,21 @@ namespace CoviDok { // This method gets called by the runtime. Use this method to add services to the container. // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940 + private readonly IConfiguration _configuration; + public Startup(IConfiguration configuration) + { + _configuration = configuration; + } - public void ConfigureServices(IServiceCollection services, IConfiguration configuration) + public void ConfigureServices(IServiceCollection services) { services.AddMvc(options => options.EnableEndpointRouting = false).SetCompatibilityVersion(CompatibilityVersion.Version_3_0); - services.AddSingleton(configuration); - var minioSection = configuration.GetSection("MinioSettings"); + services.AddSingleton(_configuration); + var minioSection = _configuration.GetSection("MinioSettings"); services.Configure(minioSection); - MySqlContext.MySqlString = configuration.GetConnectionString("MySQLDatabase"); - RedisProvider.Host = configuration.GetConnectionString("RedisHost"); + MySqlContext.MySqlString = _configuration.GetConnectionString("MySQLDatabase"); + RedisProvider.Host = _configuration.GetConnectionString("RedisHost"); } // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.