Browse Source

Bugfix in Startup

master
Daniel Gyulai 4 years ago
parent
commit
f09b4589ca
  1. 15
      CoviDok/Startup.cs

15
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<IConfiguration>(configuration);
var minioSection = configuration.GetSection("MinioSettings");
services.AddSingleton<IConfiguration>(_configuration);
var minioSection = _configuration.GetSection("MinioSettings");
services.Configure<MinioSettings>(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.

Loading…
Cancel
Save