RBLNews/RBLNews.Web/Services/ConfigService.cs
Tobias Wohlleben 20f9454f80
All checks were successful
Restart Docker Container on Production / build (pull_request) Successful in 4m31s
umbau auf enviroment appsettings
2024-09-24 22:31:15 +02:00

16 lines
426 B
C#

using RBLNews.Shared.Models;
using RBLNews.Shared.Services.Contracts;
namespace RBLNews.Web.Services;
public class ConfigService : IConfigService
{
public AppSettingsModel AppSettings { get; }
public ConfigService(IConfiguration configuration)
{
AppSettings = configuration.GetSection("App").Get<AppSettingsModel>();
if(this.AppSettings == null)
throw new NullReferenceException("App settings not found");
}
}