SqlServerMigrationsSqlGenerator.Generate 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
Generate(RenameSequenceOperation, IModel, MigrationCommandListBuilder)
通过在给定 的 上调用来生成给定 RenameSequenceOperationMigrationCommandListBuilder的命令。
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.RenameSequenceOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.RenameSequenceOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel? model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
override this.Generate : Microsoft.EntityFrameworkCore.Migrations.Operations.RenameSequenceOperation * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
Protected Overrides Sub Generate (operation As RenameSequenceOperation, model As IModel, builder As MigrationCommandListBuilder)
参数
- operation
- RenameSequenceOperation
操作。
- model
- IModel
如果存在没有模型的操作,则 null
可能是目标模型。
- builder
- MigrationCommandListBuilder
用于生成命令的命令生成器。
适用于
Generate(RenameTableOperation, IModel, MigrationCommandListBuilder)
通过在给定 的 上调用来生成给定 RenameTableOperationMigrationCommandListBuilder的命令。
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.RenameTableOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.RenameTableOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel? model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
override this.Generate : Microsoft.EntityFrameworkCore.Migrations.Operations.RenameTableOperation * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
Protected Overrides Sub Generate (operation As RenameTableOperation, model As IModel, builder As MigrationCommandListBuilder)
参数
- operation
- RenameTableOperation
操作。
- model
- IModel
如果存在没有模型的操作,则 null
可能是目标模型。
- builder
- MigrationCommandListBuilder
用于生成命令的命令生成器。
适用于
Generate(RestartSequenceOperation, IModel, MigrationCommandListBuilder)
通过对给定 的 调用来生成给定 RestartSequenceOperationMigrationCommandListBuilder的命令,然后终止最终命令。
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.RestartSequenceOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.RestartSequenceOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel? model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
override this.Generate : Microsoft.EntityFrameworkCore.Migrations.Operations.RestartSequenceOperation * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
Protected Overrides Sub Generate (operation As RestartSequenceOperation, model As IModel, builder As MigrationCommandListBuilder)
参数
- operation
- RestartSequenceOperation
操作。
- model
- IModel
如果存在没有模型的操作,则 null
可能是目标模型。
- builder
- MigrationCommandListBuilder
用于生成命令的命令生成器。
适用于
Generate(SqlOperation, IModel, MigrationCommandListBuilder)
通过对给定 的 调用来生成给定 SqlOperationMigrationCommandListBuilder的命令,然后终止最终命令。
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.SqlOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.SqlOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel? model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
override this.Generate : Microsoft.EntityFrameworkCore.Migrations.Operations.SqlOperation * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
Protected Overrides Sub Generate (operation As SqlOperation, model As IModel, builder As MigrationCommandListBuilder)
参数
- operation
- SqlOperation
操作。
- model
- IModel
如果存在没有模型的操作,则 null
可能是目标模型。
- builder
- MigrationCommandListBuilder
用于生成命令的命令生成器。
适用于
Generate(SqlServerCreateDatabaseOperation, IModel, MigrationCommandListBuilder)
通过在给定 的 上调用来生成给定 SqlServerCreateDatabaseOperationMigrationCommandListBuilder的命令。
protected virtual void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.SqlServerCreateDatabaseOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
protected virtual void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.SqlServerCreateDatabaseOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel? model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
override this.Generate : Microsoft.EntityFrameworkCore.Migrations.Operations.SqlServerCreateDatabaseOperation * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
Protected Overridable Sub Generate (operation As SqlServerCreateDatabaseOperation, model As IModel, builder As MigrationCommandListBuilder)
参数
- operation
- SqlServerCreateDatabaseOperation
操作。
- model
- IModel
如果存在没有模型的操作,则 null
可能是目标模型。
- builder
- MigrationCommandListBuilder
用于生成命令的命令生成器。
适用于
Generate(SqlServerDropDatabaseOperation, IModel, MigrationCommandListBuilder)
通过在给定 的 上调用来生成给定 SqlServerDropDatabaseOperationMigrationCommandListBuilder的命令。
protected virtual void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.SqlServerDropDatabaseOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
protected virtual void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.SqlServerDropDatabaseOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel? model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
override this.Generate : Microsoft.EntityFrameworkCore.Migrations.Operations.SqlServerDropDatabaseOperation * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
Protected Overridable Sub Generate (operation As SqlServerDropDatabaseOperation, model As IModel, builder As MigrationCommandListBuilder)
参数
- operation
- SqlServerDropDatabaseOperation
操作。
- model
- IModel
如果存在没有模型的操作,则 null
可能是目标模型。
- builder
- MigrationCommandListBuilder
用于生成命令的命令生成器。
适用于
Generate(UpdateDataOperation, IModel, MigrationCommandListBuilder)
通过对给定 的 调用来生成给定 UpdateDataOperationMigrationCommandListBuilder的命令,然后终止最终命令。
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.UpdateDataOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.UpdateDataOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel? model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
override this.Generate : Microsoft.EntityFrameworkCore.Migrations.Operations.UpdateDataOperation * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
Protected Overrides Sub Generate (operation As UpdateDataOperation, model As IModel, builder As MigrationCommandListBuilder)
参数
- operation
- UpdateDataOperation
操作。
- model
- IModel
如果存在没有模型的操作,则 null
可能是目标模型。
- builder
- MigrationCommandListBuilder
用于生成命令的命令生成器。
适用于
Generate(IReadOnlyList<MigrationOperation>, IModel, MigrationsSqlGenerationOptions)
从操作列表生成命令。
public override System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Migrations.MigrationCommand> Generate (System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Migrations.Operations.MigrationOperation> operations, Microsoft.EntityFrameworkCore.Metadata.IModel model = default, Microsoft.EntityFrameworkCore.Migrations.MigrationsSqlGenerationOptions options = Microsoft.EntityFrameworkCore.Migrations.MigrationsSqlGenerationOptions.Default);
public override System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Migrations.MigrationCommand> Generate (System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Migrations.Operations.MigrationOperation> operations, Microsoft.EntityFrameworkCore.Metadata.IModel? model = default, Microsoft.EntityFrameworkCore.Migrations.MigrationsSqlGenerationOptions options = Microsoft.EntityFrameworkCore.Migrations.MigrationsSqlGenerationOptions.Default);
override this.Generate : System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Migrations.Operations.MigrationOperation> * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationsSqlGenerationOptions -> System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Migrations.MigrationCommand>
Public Overrides Function Generate (operations As IReadOnlyList(Of MigrationOperation), Optional model As IModel = Nothing, Optional options As MigrationsSqlGenerationOptions = Microsoft.EntityFrameworkCore.Migrations.MigrationsSqlGenerationOptions.Default) As IReadOnlyList(Of MigrationCommand)
参数
- operations
- IReadOnlyList<MigrationOperation>
操作。
- model
- IModel
如果存在没有模型的操作,则 null
可能是目标模型。
- options
- MigrationsSqlGenerationOptions
生成命令时要使用的选项。
返回
要执行或编写脚本的命令列表。
适用于
Generate(AddColumnOperation, IModel, MigrationCommandListBuilder, Boolean)
通过在给定 的 上调用来生成给定 AddColumnOperationMigrationCommandListBuilder的命令。
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.AddColumnOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder, bool terminate);
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.AddColumnOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel? model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder, bool terminate);
override this.Generate : Microsoft.EntityFrameworkCore.Migrations.Operations.AddColumnOperation * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder * bool -> unit
Protected Overrides Sub Generate (operation As AddColumnOperation, model As IModel, builder As MigrationCommandListBuilder, terminate As Boolean)
参数
- operation
- AddColumnOperation
操作。
- model
- IModel
如果存在没有模型的操作,则 null
可能是目标模型。
- builder
- MigrationCommandListBuilder
用于生成命令的命令生成器。
- terminate
- Boolean
指示在为操作生成 SQL 后是否终止命令。
适用于
Generate(AddPrimaryKeyOperation, IModel, MigrationCommandListBuilder, Boolean)
通过在给定 的 上调用来生成给定 AddPrimaryKeyOperationMigrationCommandListBuilder的命令。
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.AddPrimaryKeyOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder, bool terminate = true);
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.AddPrimaryKeyOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel? model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder, bool terminate = true);
override this.Generate : Microsoft.EntityFrameworkCore.Migrations.Operations.AddPrimaryKeyOperation * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder * bool -> unit
Protected Overrides Sub Generate (operation As AddPrimaryKeyOperation, model As IModel, builder As MigrationCommandListBuilder, Optional terminate As Boolean = true)
参数
- operation
- AddPrimaryKeyOperation
操作。
- model
- IModel
如果存在没有模型的操作,则 null
可能是目标模型。
- builder
- MigrationCommandListBuilder
用于生成命令的命令生成器。
- terminate
- Boolean
指示在为操作生成 SQL 后是否终止命令。
适用于
Generate(CreateIndexOperation, IModel, MigrationCommandListBuilder, Boolean)
通过在给定 的 上调用来生成给定 CreateIndexOperationMigrationCommandListBuilder的命令。
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.CreateIndexOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder, bool terminate);
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.CreateIndexOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder, bool terminate = true);
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.CreateIndexOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel? model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder, bool terminate = true);
override this.Generate : Microsoft.EntityFrameworkCore.Migrations.Operations.CreateIndexOperation * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder * bool -> unit
Protected Overrides Sub Generate (operation As CreateIndexOperation, model As IModel, builder As MigrationCommandListBuilder, terminate As Boolean)
Protected Overrides Sub Generate (operation As CreateIndexOperation, model As IModel, builder As MigrationCommandListBuilder, Optional terminate As Boolean = true)
参数
- operation
- CreateIndexOperation
操作。
- model
- IModel
如果存在没有模型的操作,则 null
可能是目标模型。
- builder
- MigrationCommandListBuilder
用于生成命令的命令生成器。
- terminate
- Boolean
指示在为操作生成 SQL 后是否终止命令。
适用于
Generate(CreateTableOperation, IModel, MigrationCommandListBuilder, Boolean)
通过在给定 的 上调用来生成给定 CreateTableOperationMigrationCommandListBuilder的命令。
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.CreateTableOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder, bool terminate = true);
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.CreateTableOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel? model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder, bool terminate = true);
override this.Generate : Microsoft.EntityFrameworkCore.Migrations.Operations.CreateTableOperation * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder * bool -> unit
Protected Overrides Sub Generate (operation As CreateTableOperation, model As IModel, builder As MigrationCommandListBuilder, Optional terminate As Boolean = true)
参数
- operation
- CreateTableOperation
操作。
- model
- IModel
如果存在没有模型的操作,则 null
可能是目标模型。
- builder
- MigrationCommandListBuilder
用于生成命令的命令生成器。
- terminate
- Boolean
指示在为操作生成 SQL 后是否终止命令。
适用于
Generate(DropColumnOperation, IModel, MigrationCommandListBuilder, Boolean)
通过在给定 的 上调用来生成给定 DropColumnOperationMigrationCommandListBuilder的命令。
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.DropColumnOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder, bool terminate);
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.DropColumnOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder, bool terminate = true);
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.DropColumnOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel? model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder, bool terminate = true);
override this.Generate : Microsoft.EntityFrameworkCore.Migrations.Operations.DropColumnOperation * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder * bool -> unit
Protected Overrides Sub Generate (operation As DropColumnOperation, model As IModel, builder As MigrationCommandListBuilder, terminate As Boolean)
Protected Overrides Sub Generate (operation As DropColumnOperation, model As IModel, builder As MigrationCommandListBuilder, Optional terminate As Boolean = true)
参数
- operation
- DropColumnOperation
操作。
- model
- IModel
如果存在没有模型的操作,则 null
可能是目标模型。
- builder
- MigrationCommandListBuilder
用于生成命令的命令生成器。
- terminate
- Boolean
指示在为操作生成 SQL 后是否终止命令。
适用于
Generate(DropForeignKeyOperation, IModel, MigrationCommandListBuilder, Boolean)
通过在给定 的 上调用来生成给定 DropForeignKeyOperationMigrationCommandListBuilder的命令。
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.DropForeignKeyOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder, bool terminate = true);
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.DropForeignKeyOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel? model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder, bool terminate = true);
override this.Generate : Microsoft.EntityFrameworkCore.Migrations.Operations.DropForeignKeyOperation * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder * bool -> unit
Protected Overrides Sub Generate (operation As DropForeignKeyOperation, model As IModel, builder As MigrationCommandListBuilder, Optional terminate As Boolean = true)
参数
- operation
- DropForeignKeyOperation
操作。
- model
- IModel
如果存在没有模型的操作,则 null
可能是目标模型。
- builder
- MigrationCommandListBuilder
用于生成命令的命令生成器。
- terminate
- Boolean
指示在为操作生成 SQL 后是否终止命令。
适用于
Generate(DropIndexOperation, IModel, MigrationCommandListBuilder, Boolean)
通过在给定 的 上调用来生成给定 DropIndexOperationMigrationCommandListBuilder的命令。
protected virtual void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.DropIndexOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder, bool terminate);
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.DropIndexOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder, bool terminate);
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.DropIndexOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel? model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder, bool terminate);
override this.Generate : Microsoft.EntityFrameworkCore.Migrations.Operations.DropIndexOperation * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder * bool -> unit
Protected Overridable Sub Generate (operation As DropIndexOperation, model As IModel, builder As MigrationCommandListBuilder, terminate As Boolean)
Protected Overrides Sub Generate (operation As DropIndexOperation, model As IModel, builder As MigrationCommandListBuilder, terminate As Boolean)
参数
- operation
- DropIndexOperation
操作。
- model
- IModel
如果存在没有模型的操作,则 null
可能是目标模型。
- builder
- MigrationCommandListBuilder
用于生成命令的命令生成器。
- terminate
- Boolean
指示在为操作生成 SQL 后是否终止命令。
适用于
Generate(DropPrimaryKeyOperation, IModel, MigrationCommandListBuilder, Boolean)
通过在给定 的 上调用来生成给定 DropPrimaryKeyOperationMigrationCommandListBuilder的命令。
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.DropPrimaryKeyOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder, bool terminate = true);
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.DropPrimaryKeyOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel? model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder, bool terminate = true);
override this.Generate : Microsoft.EntityFrameworkCore.Migrations.Operations.DropPrimaryKeyOperation * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder * bool -> unit
Protected Overrides Sub Generate (operation As DropPrimaryKeyOperation, model As IModel, builder As MigrationCommandListBuilder, Optional terminate As Boolean = true)
参数
- operation
- DropPrimaryKeyOperation
操作。
- model
- IModel
如果存在没有模型的操作,则 null
可能是目标模型。
- builder
- MigrationCommandListBuilder
用于生成命令的命令生成器。
- terminate
- Boolean
指示在为操作生成 SQL 后是否终止命令。
适用于
Generate(DropTableOperation, IModel, MigrationCommandListBuilder, Boolean)
通过在给定 的 上调用来生成给定 DropTableOperationMigrationCommandListBuilder的命令。
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.DropTableOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder, bool terminate = true);
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.DropTableOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel? model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder, bool terminate = true);
override this.Generate : Microsoft.EntityFrameworkCore.Migrations.Operations.DropTableOperation * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder * bool -> unit
Protected Overrides Sub Generate (operation As DropTableOperation, model As IModel, builder As MigrationCommandListBuilder, Optional terminate As Boolean = true)
参数
- operation
- DropTableOperation
操作。
- model
- IModel
如果存在没有模型的操作,则 null
可能是目标模型。
- builder
- MigrationCommandListBuilder
用于生成命令的命令生成器。
- terminate
- Boolean
指示在为操作生成 SQL 后是否终止命令。
适用于
Generate(InsertDataOperation, IModel, MigrationCommandListBuilder, Boolean)
通过在给定 的 上调用来生成给定 InsertDataOperationMigrationCommandListBuilder的命令。
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.InsertDataOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder, bool terminate = true);
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.InsertDataOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel? model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder, bool terminate = true);
override this.Generate : Microsoft.EntityFrameworkCore.Migrations.Operations.InsertDataOperation * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder * bool -> unit
Protected Overrides Sub Generate (operation As InsertDataOperation, model As IModel, builder As MigrationCommandListBuilder, Optional terminate As Boolean = true)
参数
- operation
- InsertDataOperation
操作。
- model
- IModel
如果存在没有模型的操作,则 null
可能是目标模型。
- builder
- MigrationCommandListBuilder
用于生成命令的命令生成器。
- terminate
- Boolean
指示在为操作生成 SQL 后是否终止命令。
适用于
Generate(AddForeignKeyOperation, IModel, MigrationCommandListBuilder, Boolean)
通过在给定 的 上调用来生成给定 AddForeignKeyOperationMigrationCommandListBuilder的命令。
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.AddForeignKeyOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder, bool terminate = true);
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.AddForeignKeyOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel? model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder, bool terminate = true);
override this.Generate : Microsoft.EntityFrameworkCore.Migrations.Operations.AddForeignKeyOperation * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder * bool -> unit
Protected Overrides Sub Generate (operation As AddForeignKeyOperation, model As IModel, builder As MigrationCommandListBuilder, Optional terminate As Boolean = true)
参数
- operation
- AddForeignKeyOperation
操作。
- model
- IModel
如果存在没有模型的操作,则 null
可能是目标模型。
- builder
- MigrationCommandListBuilder
用于生成命令的命令生成器。
- terminate
- Boolean
指示在为操作生成 SQL 后是否终止命令。
适用于
Generate(RenameIndexOperation, IModel, MigrationCommandListBuilder)
通过在给定 的 上调用来生成给定 RenameIndexOperationMigrationCommandListBuilder的命令。
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.RenameIndexOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.RenameIndexOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel? model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
override this.Generate : Microsoft.EntityFrameworkCore.Migrations.Operations.RenameIndexOperation * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
Protected Overrides Sub Generate (operation As RenameIndexOperation, model As IModel, builder As MigrationCommandListBuilder)
参数
- operation
- RenameIndexOperation
操作。
- model
- IModel
如果存在没有模型的操作,则 null
可能是目标模型。
- builder
- MigrationCommandListBuilder
用于生成命令的命令生成器。
适用于
Generate(DropIndexOperation, IModel, MigrationCommandListBuilder)
通过对给定 的 调用来生成给定 DropIndexOperationMigrationCommandListBuilder的命令,然后终止最终命令。
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.DropIndexOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
override this.Generate : Microsoft.EntityFrameworkCore.Migrations.Operations.DropIndexOperation * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
Protected Overrides Sub Generate (operation As DropIndexOperation, model As IModel, builder As MigrationCommandListBuilder)
参数
- operation
- DropIndexOperation
操作。
- model
- IModel
如果存在没有模型的操作,则 null
可能是目标模型。
- builder
- MigrationCommandListBuilder
用于生成命令的命令生成器。
适用于
Generate(MigrationOperation, IModel, MigrationCommandListBuilder)
通过在给定 的 上调用来生成给定 MigrationOperationMigrationCommandListBuilder的命令。
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.MigrationOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.MigrationOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel? model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
override this.Generate : Microsoft.EntityFrameworkCore.Migrations.Operations.MigrationOperation * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
Protected Overrides Sub Generate (operation As MigrationOperation, model As IModel, builder As MigrationCommandListBuilder)
参数
- operation
- MigrationOperation
操作。
- model
- IModel
如果存在没有模型的操作,则 null
可能是目标模型。
- builder
- MigrationCommandListBuilder
用于生成命令的命令生成器。
注解
此方法使用双调度机制来调用 MigrationsSqlGenerator.Generate 特定于 的特定子类型的 MigrationOperation方法。 通常,数据库提供程序将重写这些特定方法,而不是此方法。 但是,提供程序可以重写此方法来处理特定于提供程序的操作。
适用于
Generate(IReadOnlyList<MigrationOperation>, IModel)
从操作列表生成命令。
public override System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Migrations.MigrationCommand> Generate (System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Migrations.Operations.MigrationOperation> operations, Microsoft.EntityFrameworkCore.Metadata.IModel model);
override this.Generate : System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Migrations.Operations.MigrationOperation> * Microsoft.EntityFrameworkCore.Metadata.IModel -> System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Migrations.MigrationCommand>
Public Overrides Function Generate (operations As IReadOnlyList(Of MigrationOperation), model As IModel) As IReadOnlyList(Of MigrationCommand)
参数
- operations
- IReadOnlyList<MigrationOperation>
操作。
- model
- IModel
如果存在没有模型的操作,则 null
可能是目标模型。
返回
要执行或编写脚本的命令列表。
适用于
Generate(AddCheckConstraintOperation, IModel, MigrationCommandListBuilder)
通过对给定 的 调用来生成给定 AddCheckConstraintOperationMigrationCommandListBuilder的命令,然后终止最终命令。
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.AddCheckConstraintOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.AddCheckConstraintOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel? model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
override this.Generate : Microsoft.EntityFrameworkCore.Migrations.Operations.AddCheckConstraintOperation * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
Protected Overrides Sub Generate (operation As AddCheckConstraintOperation, model As IModel, builder As MigrationCommandListBuilder)
参数
- operation
- AddCheckConstraintOperation
操作。
- model
- IModel
如果存在没有模型的操作,则 null
可能是目标模型。
- builder
- MigrationCommandListBuilder
用于生成命令的命令生成器。
适用于
Generate(AddColumnOperation, IModel, MigrationCommandListBuilder)
通过对给定 的 调用来生成给定 AddColumnOperationMigrationCommandListBuilder的命令,然后终止最终命令。
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.AddColumnOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
override this.Generate : Microsoft.EntityFrameworkCore.Migrations.Operations.AddColumnOperation * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
Protected Overrides Sub Generate (operation As AddColumnOperation, model As IModel, builder As MigrationCommandListBuilder)
参数
- operation
- AddColumnOperation
操作。
- model
- IModel
如果存在没有模型的操作,则 null
可能是目标模型。
- builder
- MigrationCommandListBuilder
用于生成命令的命令生成器。
适用于
Generate(AddForeignKeyOperation, IModel, MigrationCommandListBuilder)
通过对给定 的 调用来生成给定 AddForeignKeyOperationMigrationCommandListBuilder的命令,然后终止最终命令。
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.AddForeignKeyOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
override this.Generate : Microsoft.EntityFrameworkCore.Migrations.Operations.AddForeignKeyOperation * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
Protected Overrides Sub Generate (operation As AddForeignKeyOperation, model As IModel, builder As MigrationCommandListBuilder)
参数
- operation
- AddForeignKeyOperation
操作。
- model
- IModel
如果存在没有模型的操作,则 null
可能是目标模型。
- builder
- MigrationCommandListBuilder
用于生成命令的命令生成器。
适用于
Generate(RenameColumnOperation, IModel, MigrationCommandListBuilder)
通过在给定 的 上调用来生成给定 RenameColumnOperationMigrationCommandListBuilder的命令。
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.RenameColumnOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.RenameColumnOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel? model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
override this.Generate : Microsoft.EntityFrameworkCore.Migrations.Operations.RenameColumnOperation * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
Protected Overrides Sub Generate (operation As RenameColumnOperation, model As IModel, builder As MigrationCommandListBuilder)
参数
- operation
- RenameColumnOperation
操作。
- model
- IModel
如果存在没有模型的操作,则 null
可能是目标模型。
- builder
- MigrationCommandListBuilder
用于生成命令的命令生成器。
适用于
Generate(AlterColumnOperation, IModel, MigrationCommandListBuilder)
通过在给定 的 上调用来生成给定 AlterColumnOperationMigrationCommandListBuilder的命令。
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.AlterColumnOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.AlterColumnOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel? model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
override this.Generate : Microsoft.EntityFrameworkCore.Migrations.Operations.AlterColumnOperation * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
Protected Overrides Sub Generate (operation As AlterColumnOperation, model As IModel, builder As MigrationCommandListBuilder)
参数
- operation
- AlterColumnOperation
操作。
- model
- IModel
如果存在没有模型的操作,则 null
可能是目标模型。
- builder
- MigrationCommandListBuilder
用于生成命令的命令生成器。
适用于
Generate(AlterDatabaseOperation, IModel, MigrationCommandListBuilder)
通过在给定 的 上调用来生成给定 AlterDatabaseOperationMigrationCommandListBuilder的命令。
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.AlterDatabaseOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.AlterDatabaseOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel? model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
override this.Generate : Microsoft.EntityFrameworkCore.Migrations.Operations.AlterDatabaseOperation * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
Protected Overrides Sub Generate (operation As AlterDatabaseOperation, model As IModel, builder As MigrationCommandListBuilder)
参数
- operation
- AlterDatabaseOperation
操作。
- model
- IModel
如果存在没有模型的操作,则 null
可能是目标模型。
- builder
- MigrationCommandListBuilder
用于生成命令的命令生成器。
适用于
Generate(AlterTableOperation, IModel, MigrationCommandListBuilder)
通过在给定 的 上调用来生成给定 AlterTableOperationMigrationCommandListBuilder的命令。
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.AlterTableOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.AlterTableOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel? model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
override this.Generate : Microsoft.EntityFrameworkCore.Migrations.Operations.AlterTableOperation * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
Protected Overrides Sub Generate (operation As AlterTableOperation, model As IModel, builder As MigrationCommandListBuilder)
参数
- operation
- AlterTableOperation
操作。
- model
- IModel
如果存在没有模型的操作,则 null
可能是目标模型。
- builder
- MigrationCommandListBuilder
用于生成命令的命令生成器。
适用于
Generate(CreateIndexOperation, IModel, MigrationCommandListBuilder)
通过对给定 的 调用来生成给定 CreateIndexOperationMigrationCommandListBuilder的命令,然后终止最终命令。
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.CreateIndexOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
override this.Generate : Microsoft.EntityFrameworkCore.Migrations.Operations.CreateIndexOperation * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
Protected Overrides Sub Generate (operation As CreateIndexOperation, model As IModel, builder As MigrationCommandListBuilder)
参数
- operation
- CreateIndexOperation
操作。
- model
- IModel
如果存在没有模型的操作,则 null
可能是目标模型。
- builder
- MigrationCommandListBuilder
用于生成命令的命令生成器。
适用于
Generate(AddPrimaryKeyOperation, IModel, MigrationCommandListBuilder)
通过对给定 的 调用来生成给定 AddPrimaryKeyOperationMigrationCommandListBuilder的命令,然后终止最终命令。
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.AddPrimaryKeyOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
override this.Generate : Microsoft.EntityFrameworkCore.Migrations.Operations.AddPrimaryKeyOperation * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
Protected Overrides Sub Generate (operation As AddPrimaryKeyOperation, model As IModel, builder As MigrationCommandListBuilder)
参数
- operation
- AddPrimaryKeyOperation
操作。
- model
- IModel
如果存在没有模型的操作,则 null
可能是目标模型。
- builder
- MigrationCommandListBuilder
用于生成命令的命令生成器。
适用于
Generate(CreateTableOperation, IModel, MigrationCommandListBuilder)
通过对给定 的 调用来生成给定 CreateTableOperationMigrationCommandListBuilder的命令,然后终止最终命令。
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.CreateTableOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
override this.Generate : Microsoft.EntityFrameworkCore.Migrations.Operations.CreateTableOperation * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
Protected Overrides Sub Generate (operation As CreateTableOperation, model As IModel, builder As MigrationCommandListBuilder)
参数
- operation
- CreateTableOperation
操作。
- model
- IModel
如果存在没有模型的操作,则 null
可能是目标模型。
- builder
- MigrationCommandListBuilder
用于生成命令的命令生成器。
适用于
Generate(DeleteDataOperation, IModel, MigrationCommandListBuilder)
通过对给定 的 调用来生成给定 DeleteDataOperationMigrationCommandListBuilder的命令,然后终止最终命令。
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.DeleteDataOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.DeleteDataOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel? model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
override this.Generate : Microsoft.EntityFrameworkCore.Migrations.Operations.DeleteDataOperation * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
Protected Overrides Sub Generate (operation As DeleteDataOperation, model As IModel, builder As MigrationCommandListBuilder)
参数
- operation
- DeleteDataOperation
操作。
- model
- IModel
如果存在没有模型的操作,则 null
可能是目标模型。
- builder
- MigrationCommandListBuilder
用于生成命令的命令生成器。
适用于
Generate(DropColumnOperation, IModel, MigrationCommandListBuilder)
通过对给定 的 调用来生成给定 DropColumnOperationMigrationCommandListBuilder的命令,然后终止最终命令。
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.DropColumnOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
override this.Generate : Microsoft.EntityFrameworkCore.Migrations.Operations.DropColumnOperation * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
Protected Overrides Sub Generate (operation As DropColumnOperation, model As IModel, builder As MigrationCommandListBuilder)
参数
- operation
- DropColumnOperation
操作。
- model
- IModel
如果存在没有模型的操作,则 null
可能是目标模型。
- builder
- MigrationCommandListBuilder
用于生成命令的命令生成器。
适用于
Generate(DropForeignKeyOperation, IModel, MigrationCommandListBuilder)
通过对给定 的 调用来生成给定 DropForeignKeyOperationMigrationCommandListBuilder的命令,然后终止最终命令。
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.DropForeignKeyOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
override this.Generate : Microsoft.EntityFrameworkCore.Migrations.Operations.DropForeignKeyOperation * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
Protected Overrides Sub Generate (operation As DropForeignKeyOperation, model As IModel, builder As MigrationCommandListBuilder)
参数
- operation
- DropForeignKeyOperation
操作。
- model
- IModel
如果存在没有模型的操作,则 null
可能是目标模型。
- builder
- MigrationCommandListBuilder
用于生成命令的命令生成器。
适用于
Generate(DropPrimaryKeyOperation, IModel, MigrationCommandListBuilder)
通过对给定 的 调用来生成给定 DropPrimaryKeyOperationMigrationCommandListBuilder的命令,然后终止最终命令。
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.DropPrimaryKeyOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
override this.Generate : Microsoft.EntityFrameworkCore.Migrations.Operations.DropPrimaryKeyOperation * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
Protected Overrides Sub Generate (operation As DropPrimaryKeyOperation, model As IModel, builder As MigrationCommandListBuilder)
参数
- operation
- DropPrimaryKeyOperation
操作。
- model
- IModel
如果存在没有模型的操作,则 null
可能是目标模型。
- builder
- MigrationCommandListBuilder
用于生成命令的命令生成器。
适用于
Generate(DropTableOperation, IModel, MigrationCommandListBuilder)
通过对给定 的 调用来生成给定 DropTableOperationMigrationCommandListBuilder的命令,然后终止最终命令。
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.DropTableOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
override this.Generate : Microsoft.EntityFrameworkCore.Migrations.Operations.DropTableOperation * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
Protected Overrides Sub Generate (operation As DropTableOperation, model As IModel, builder As MigrationCommandListBuilder)
参数
- operation
- DropTableOperation
操作。
- model
- IModel
如果存在没有模型的操作,则 null
可能是目标模型。
- builder
- MigrationCommandListBuilder
用于生成命令的命令生成器。
适用于
Generate(EnsureSchemaOperation, IModel, MigrationCommandListBuilder)
通过在给定 的 上调用来生成给定 EnsureSchemaOperationMigrationCommandListBuilder的命令。
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.EnsureSchemaOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.EnsureSchemaOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel? model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
override this.Generate : Microsoft.EntityFrameworkCore.Migrations.Operations.EnsureSchemaOperation * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
Protected Overrides Sub Generate (operation As EnsureSchemaOperation, model As IModel, builder As MigrationCommandListBuilder)
参数
- operation
- EnsureSchemaOperation
操作。
- model
- IModel
如果存在没有模型的操作,则 null
可能是目标模型。
- builder
- MigrationCommandListBuilder
用于生成命令的命令生成器。
适用于
Generate(InsertDataOperation, IModel, MigrationCommandListBuilder)
通过对给定 的 调用来生成给定 InsertDataOperationMigrationCommandListBuilder的命令,然后终止最终命令。
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.InsertDataOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
override this.Generate : Microsoft.EntityFrameworkCore.Migrations.Operations.InsertDataOperation * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
Protected Overrides Sub Generate (operation As InsertDataOperation, model As IModel, builder As MigrationCommandListBuilder)
参数
- operation
- InsertDataOperation
操作。
- model
- IModel
如果存在没有模型的操作,则 null
可能是目标模型。
- builder
- MigrationCommandListBuilder
用于生成命令的命令生成器。
适用于
Generate(CreateSequenceOperation, IModel, MigrationCommandListBuilder)
通过对给定 的 调用来生成给定 CreateSequenceOperationMigrationCommandListBuilder的命令,然后终止最终命令。
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.CreateSequenceOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.CreateSequenceOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel? model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
override this.Generate : Microsoft.EntityFrameworkCore.Migrations.Operations.CreateSequenceOperation * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
Protected Overrides Sub Generate (operation As CreateSequenceOperation, model As IModel, builder As MigrationCommandListBuilder)
参数
- operation
- CreateSequenceOperation
操作。
- model
- IModel
如果存在没有模型的操作,则 null
可能是目标模型。
- builder
- MigrationCommandListBuilder
用于生成命令的命令生成器。