/// <exception cref = "SqlException" /> /// <exception cref = "OperationCanceledException" /> static async ValueTask <MigrationDescriptor?> MbNextDescriptor (IDbMigrationProvider dbMigrationProvider, IRwSqlTransaction transaction, String migrationSchema, MigrationDescriptorCollection descriptors, CancellationToken cancellationToken) { var mbLastMigration = await dbMigrationProvider.MaybeLastMigrationInfo(transaction, migrationSchema, cancellationToken); if (!(mbLastMigration is {} lastMigration)) { return(descriptors[0]); }
public DbMigrationService (DbMigrationState state, IDbProvider dbProvider, IDbMigrationProvider dbMigrationProvider, IDbMigrationPlan migrationPlan, IHostApplicationLifetime appLifetime, IServiceProvider serviceProvider, ILogger <DbMigrationService> logger) { this.state = state; this.dbProvider = dbProvider; this.dbMigrationProvider = dbMigrationProvider; this.migrationPlan = migrationPlan; this.appLifetime = appLifetime; this.serviceProvider = serviceProvider; this.logger = logger; }