fix: get connection string from configuration

This commit is contained in:
Polianin Nikita 2024-05-28 06:45:31 +03:00
parent 202098b723
commit 99ecc4af5c

View File

@ -45,7 +45,7 @@ public class Program
builder.Configuration.AddJsonFile(Settings.FilePath, optional: true, reloadOnChange: true);
builder.Services.AddApplication();
builder.Services.AddPersistence(builder.Configuration);
builder.Services.AddPersistence(builder.Configuration.Get<GeneralConfig>()?.DbSettings?.ConnectionStringSql ?? string.Empty);
builder.Services.AddControllers();
builder.Services.AddCors(options =>