IMigrationsSqlGenerator Interface


A service for generating MigrationCommand objects that can then be executed or scripted from a list of MigrationOperations.

public interface IMigrationsSqlGenerator
type IMigrationsSqlGenerator = interface
Public Interface IMigrationsSqlGenerator


The service lifetime is Scoped. This means that each DbContext instance will use its own instance of this service. The implementation may depend on other services registered with any lifetime. The implementation does not need to be thread-safe.

See Database migrations for more information and examples.


Generate(IReadOnlyList<MigrationOperation>, IModel)

Generates commands from a list of operations.

Generate(IReadOnlyList<MigrationOperation>, IModel, MigrationsSqlGenerationOptions)

Generates commands from a list of operations.

Applies to