Something went wrong. Try again.
Something went wrong. Try again.
1234567891011121314151617namespace Website.Components.Data;public static class Extensions{ public static void CreateDbIfNotExists(this IHost host) { { using (var scope = host.Services.CreateScope()) { var services = scope.ServiceProvider; var context = services.GetRequiredService<ImageContext>(); services.GetRequiredService<CsProjectContext>(); context.Database.EnsureCreated(); DbInitializer.Initialize(context); } } }}