protected override IHost CreateHost(IHostBuilder builder)
        {
            var host = base.CreateHost(builder);

            IdentityMigrationManager.SeedDatabaseAsync(host).GetAwaiter().GetResult();
            return(host);
        }
Beispiel #2
0
 public static IHost MigrateAndSeed(this IHost host)
 {
     PersistenceMigrationManager.MigrateDatabaseAsync(host).GetAwaiter().GetResult();
     IdentityMigrationManager.MigrateDatabaseAsync(host).GetAwaiter().GetResult();
     IdentityMigrationManager.SeedDatabaseAsync(host).GetAwaiter().GetResult();
     return(host);
 }