feat: use path wrapper
Some checks failed
.NET Test Pipeline / build-and-test (pull_request) Failing after 1m24s

This commit is contained in:
Polianin Nikita 2024-05-28 06:49:40 +03:00
parent d7299a1afd
commit fb736a1c34

View File

@ -8,6 +8,7 @@ using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Options;
using Mirea.Api.DataAccess.Application;
using Mirea.Api.DataAccess.Persistence;
using Mirea.Api.Endpoint.Common.Services;
using Mirea.Api.Endpoint.Configuration;
using Mirea.Api.Endpoint.Properties;
using Mirea.Api.Endpoint.Configuration.Swagger;
@ -42,7 +43,8 @@ public class Program
var builder = WebApplication.CreateBuilder(args);
builder.Configuration.AddConfiguration(ConfigureEnvironment());
builder.Configuration.AddJsonFile(Settings.FilePath, optional: true, reloadOnChange: true);
builder.Configuration.AddJsonFile(PathBuilder.Combine(GeneralConfig.FilePath), optional: true, reloadOnChange: true);
builder.Services.Configure<GeneralConfig>(builder.Configuration);
builder.Services.AddApplication();
builder.Services.AddPersistence(builder.Configuration.Get<GeneralConfig>()?.DbSettings?.ConnectionStringSql ?? string.Empty);