private void PrepareDatabase() { var ct = CancellationToken.None; using (var connection = new OracleConnection(ConnectionString)) using (var context = new MigratorTestContext(connection)) { var manager = new OracleMigrationManager <MigratorTestContext>( context, new DefaultNamingNormalizer <MigratorTestContext>(), LoggingManager.LoggerFactory); manager.PrepareDatabaseAsync(ct) .ConfigureAwait(false) .GetAwaiter() .GetResult(); string migrationId; string className; MigrationsTestHelper.GenerateMigrationInfo( DateTimeOffset.UtcNow, out migrationId, out className); // Existing static migration manager.AddMigrationAsync(migrationId, className, null, ct) .ConfigureAwait(false) .GetAwaiter() .GetResult(); } }
private void PrepareDatabase() { var ct = CancellationToken.None; using (var context = new OracleMigratorTestContext(Options)) { var manager = new OracleMigrationManager <OracleMigratorTestContext>(context, LoggingManager.LoggerFactory); manager.PrepareDatabaseAsync(ct) .ConfigureAwait(false) .GetAwaiter() .GetResult(); MigrationsTestHelper.GenerateMigrationInfo( DateTimeOffset.UtcNow, out var migrationId, out var className); // Existing static migration manager.AddMigrationAsync(migrationId, className, null, ct) .ConfigureAwait(false) .GetAwaiter() .GetResult(); } }