.AddEnvironmentVariables()

master
Tudor Stanciu 2021-11-14 11:41:11 +02:00
parent f04a9e130d
commit 0bcf605539
2 changed files with 2 additions and 0 deletions

View File

@ -27,6 +27,7 @@ namespace NetworkResurrector.Api
var configuration = new ConfigurationBuilder()
.SetBasePath(Directory.GetCurrentDirectory())
.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
.AddEnvironmentVariables()
.Build();
var connectionString = configuration.GetConnectionString("DatabaseConnection");

View File

@ -27,6 +27,7 @@ namespace NetworkResurrector.Server
var configuration = new ConfigurationBuilder()
.SetBasePath(Directory.GetCurrentDirectory())
.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
.AddEnvironmentVariables()
.Build();
var connectionString = configuration.GetConnectionString("DatabaseConnection");