Share via


IMigrationsSqlGenerator Interface

Definition

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
Derived

Remarks

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.

Methods

Generate(IReadOnlyList<MigrationOperation>, IModel, MigrationsSqlGenerationOptions)

Generates commands from a list of operations.

Generate(IReadOnlyList<MigrationOperation>, IModel)

Generates commands from a list of operations.

Applies to