public static async Task <MigratorHarness <TContext> > CreateAsync() { var harness = new MigratorHarness <TContext>(); await harness.CreateDatabaseAsync(); return(harness); }
public async Task AssertAsync <TContext>(Func <TArrangement, SqlConnection, Task> fn) where TContext : DbContext { using var harness = await MigratorHarness <TContext> .CreateAsync(); await _sourceMigration.ApplyAsync(harness); TArrangement arrangement = await harness.UseConnectionAsync(_fn); await harness.TargetMigrationAsync(_migrationName); await harness.UseConnectionAsync(conn => fn(arrangement, conn)); }
public async Task ApplyAsync <TContext>(MigratorHarness <TContext> harness) where TContext : DbContext { await harness.TargetMigrationAsync(_migrationName); }