using Netina.Repository.Services.Abstracts; namespace Netina.Repository; public static class RepositoryConfig { public static async Task InitialDb(this IApplicationBuilder app) { var scopeFactory = app.ApplicationServices.GetRequiredService(); using (var scope = scopeFactory.CreateScope()) { var identityDbInitialize = scope.ServiceProvider.GetService(); if (identityDbInitialize != null) { identityDbInitialize.Initialize(); await identityDbInitialize.SeedDate(); await identityDbInitialize.Refactor(); } } } }