Implement Appsettings
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using FoodsharingSiegen.Server.Data;
|
||||
using FoodsharingSiegen.Contracts.Model;
|
||||
using FoodsharingSiegen.Server.Data;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Configuration.Json;
|
||||
|
||||
@@ -52,6 +53,8 @@ namespace FoodsharingSiegen.Server
|
||||
// Add each file to the configuration
|
||||
foreach (var file in configFiles) builder.Configuration.AddJsonFile(file, true, true);
|
||||
}
|
||||
|
||||
builder.Services.Configure<AppSettings>(builder.Configuration.GetSection("Settings"));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user