Share via


IMigrationCommandExecutor Interface

Definition

A service for executing migration commands against a database.

public interface IMigrationCommandExecutor
type IMigrationCommandExecutor = interface
Public Interface IMigrationCommandExecutor

Remarks

The service lifetime is Singleton. This means a single instance is used by many DbContext instances. The implementation must be thread-safe. This service cannot depend on services registered as Scoped.

See Database migrations for more information and examples.

Methods

ExecuteNonQuery(IEnumerable<MigrationCommand>, IRelationalConnection)

Executes the given commands using the given database connection.

ExecuteNonQueryAsync(IEnumerable<MigrationCommand>, IRelationalConnection, CancellationToken)

Executes the given commands using the given database connection.

Applies to