diff --git a/Endpoint/Program.cs b/Endpoint/Program.cs index 34e352a..f649536 100644 --- a/Endpoint/Program.cs +++ b/Endpoint/Program.cs @@ -42,7 +42,8 @@ public class Program builder.Configuration.AddConfiguration(ConfigureEnvironment()); builder.Configuration.AddJsonFile(Settings.FilePath, optional: true, reloadOnChange: true); - // Add services to the container. + builder.Services.AddApplication(); + builder.Services.AddPersistence(builder.Configuration); builder.Services.AddControllers(); builder.Services.AddCors(options => @@ -89,6 +90,10 @@ public class Program foreach (var item in app.Configuration.AsEnumerable()) Console.WriteLine($"{item.Key}:{item.Value}"); #endif + + var uber = app.Services.CreateScope().ServiceProvider.GetService(); + DbInitializer.Initialize(uber!); + // Configure the HTTP request pipeline. if (app.Environment.IsDevelopment()) {