Exemplo n.º 1
0
        protected override IHost CreateHost(IHostBuilder builder)
        {
            var host = base.CreateHost(builder);

            IdentityMigrationManager.SeedDatabaseAsync(host).GetAwaiter().GetResult();
            return(host);
        }
Exemplo n.º 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);
 }