IMigrationsSqlGenerator 接口

定义

一个服务,用于生成 MigrationCommand 对象,然后可以从 的列表中 MigrationOperation执行或编写脚本。

public interface IMigrationsSqlGenerator
type IMigrationsSqlGenerator = interface
Public Interface IMigrationsSqlGenerator
派生

注解

服务生存期为 Scoped。 这意味着每个 DbContext 实例都将使用此服务自己的实例。 实现可能依赖于使用任何生存期注册的其他服务。 实现不需要是线程安全的。

有关详细信息和示例 ,请参阅数据库迁移

方法

Generate(IReadOnlyList<MigrationOperation>, IModel)

从操作列表生成命令。

Generate(IReadOnlyList<MigrationOperation>, IModel, MigrationsSqlGenerationOptions)

从操作列表生成命令。

适用于