ASPnet Kern appNet Kern: Zugriff auf appsettings.json Werte von Autofac Modul
1) Autofac Modul wie die
public class AutofacModule : Module
{
protected override void Load(ContainerBuilder builder)
{
//Register my components. Need to access to appsettings.json values from here
}
}
2) Module von step№1 in Startup.cs
registriert
public void ConfigureContainer(ContainerBuilder builder)
{
builder.RegisterModule(new AutofacModule());
}
Zugriff auf appsettings.json
Werte von AutofacModule
? Ich brauche das für meine Objekte innerhalb AutofacModule
erstellen und für DI verwenden.