SqliteMigrationsSqlGenerator.Generate 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
Generate(DropUniqueConstraintOperation, IModel, MigrationCommandListBuilder)
擲回 , NotSupportedException 因為此作業需要尚未支援的資料表重建。
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.DropUniqueConstraintOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.DropUniqueConstraintOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel? model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
override this.Generate : Microsoft.EntityFrameworkCore.Migrations.Operations.DropUniqueConstraintOperation * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
Protected Overrides Sub Generate (operation As DropUniqueConstraintOperation, model As IModel, builder As MigrationCommandListBuilder)
參數
- operation
- DropUniqueConstraintOperation
作業。
- model
- IModel
目標模型,如果 null
作業不存在模型,則可能是 。
- builder
- MigrationCommandListBuilder
用來建置命令的命令產生器。
適用於
Generate(EnsureSchemaOperation, IModel, MigrationCommandListBuilder)
忽略,因為 SQLite 不支援架構,而且會以無訊息方式忽略以改善測試相容性。
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(RenameColumnOperation, IModel, MigrationCommandListBuilder)
藉由在指定的 上呼叫 ,為指定的 RenameTableOperation 建置命令 MigrationCommandListBuilder 。
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(RenameIndexOperation, IModel, MigrationCommandListBuilder)
藉由在指定的 上呼叫 ,為指定的 RenameIndexOperation 建置命令 MigrationCommandListBuilder 。
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(RenameSequenceOperation, IModel, MigrationCommandListBuilder)
擲回 , NotSupportedException 因為 SQLite 不支援序列。
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)
藉由在指定的 上呼叫 ,為指定的 RenameTableOperation 建置命令 MigrationCommandListBuilder 。
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)
擲回 , NotSupportedException 因為 SQLite 不支援序列。
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(CreateTableOperation, IModel, MigrationCommandListBuilder, Boolean)
在指定的 上呼叫 來建置所 MigrationCommandListBuilder 指定 CreateTableOperation 的 命令。
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(AddColumnOperation, IModel, MigrationCommandListBuilder, Boolean)
在指定的 上呼叫 來建置所 MigrationCommandListBuilder 指定 AddColumnOperation 的 命令。
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(AddForeignKeyOperation, IModel, MigrationCommandListBuilder, Boolean)
擲回 , NotSupportedException 因為此作業需要尚未支援的資料表重建。
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(AddPrimaryKeyOperation, IModel, MigrationCommandListBuilder, Boolean)
擲回 , NotSupportedException 因為此作業需要尚未支援的資料表重建。
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(DropSequenceOperation, IModel, MigrationCommandListBuilder)
擲回 , NotSupportedException 因為 SQLite 不支援序列。
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.DropSequenceOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.DropSequenceOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel? model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
override this.Generate : Microsoft.EntityFrameworkCore.Migrations.Operations.DropSequenceOperation * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
Protected Overrides Sub Generate (operation As DropSequenceOperation, model As IModel, builder As MigrationCommandListBuilder)
參數
- operation
- DropSequenceOperation
作業。
- model
- IModel
目標模型,如果作業不存在模型,則可能 null
是。
- builder
- MigrationCommandListBuilder
用來建置命令的命令產生器。
適用於
Generate(DropColumnOperation, IModel, MigrationCommandListBuilder, Boolean)
擲回 , NotSupportedException 因為此作業需要尚未支援的資料表重建。
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, Optional terminate As Boolean = true)
參數
- operation
- DropColumnOperation
作業。
- model
- IModel
目標模型,如果作業不存在模型,則可能 null
是。
- builder
- MigrationCommandListBuilder
用來建置命令的命令產生器。
- terminate
- Boolean
指出是否要在產生作業的 SQL 之後終止命令。
適用於
Generate(DropForeignKeyOperation, IModel, MigrationCommandListBuilder, Boolean)
擲回 , NotSupportedException 因為此作業需要尚未支援的資料表重建。
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(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(DropSchemaOperation, IModel, MigrationCommandListBuilder)
忽略,因為 SQLite 不支援架構,而且會以無訊息方式忽略以改善測試相容性。
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.DropSchemaOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.DropSchemaOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel? model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
override this.Generate : Microsoft.EntityFrameworkCore.Migrations.Operations.DropSchemaOperation * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
Protected Overrides Sub Generate (operation As DropSchemaOperation, model As IModel, builder As MigrationCommandListBuilder)
參數
- operation
- DropSchemaOperation
作業。
- model
- IModel
目標模型,如果作業不存在模型,則可能 null
是。
- builder
- MigrationCommandListBuilder
用來建置命令的命令產生器。
適用於
Generate(DropCheckConstraintOperation, IModel, MigrationCommandListBuilder)
擲回 , NotSupportedException 因為此作業需要尚未支援的資料表重建。
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.DropCheckConstraintOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.DropCheckConstraintOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel? model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
override this.Generate : Microsoft.EntityFrameworkCore.Migrations.Operations.DropCheckConstraintOperation * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
Protected Overrides Sub Generate (operation As DropCheckConstraintOperation, model As IModel, builder As MigrationCommandListBuilder)
參數
- operation
- DropCheckConstraintOperation
作業。
- model
- IModel
目標模型,如果作業不存在模型,則可能 null
是。
- builder
- MigrationCommandListBuilder
用來建置命令的命令產生器。
適用於
Generate(DropIndexOperation, IModel, MigrationCommandListBuilder)
在指定的 上呼叫 來建置所 MigrationCommandListBuilder 指定 DropIndexOperation 的 命令。
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(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 = default);
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), Optional model As IModel = Nothing) As IReadOnlyList(Of MigrationCommand)
參數
- operations
- IReadOnlyList<MigrationOperation>
作業。
- model
- IModel
目標模型,如果作業不存在模型,則可能 null
是。
傳回
要執行或編寫腳本的命令清單。
適用於
Generate(AddCheckConstraintOperation, IModel, MigrationCommandListBuilder)
擲回 , NotSupportedException 因為此作業需要尚未支援的資料表重建。
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(AddForeignKeyOperation, IModel, MigrationCommandListBuilder)
擲回 , NotSupportedException 因為此作業需要尚未支援的資料表重建。
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(AddPrimaryKeyOperation, IModel, MigrationCommandListBuilder)
擲回 , NotSupportedException 因為此作業需要尚未支援的資料表重建。
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(AddUniqueConstraintOperation, IModel, MigrationCommandListBuilder)
擲回 , NotSupportedException 因為此作業需要尚未支援的資料表重建。
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.AddUniqueConstraintOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.AddUniqueConstraintOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel? model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
override this.Generate : Microsoft.EntityFrameworkCore.Migrations.Operations.AddUniqueConstraintOperation * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
Protected Overrides Sub Generate (operation As AddUniqueConstraintOperation, model As IModel, builder As MigrationCommandListBuilder)
參數
- operation
- AddUniqueConstraintOperation
作業。
- model
- IModel
目標模型,如果作業不存在模型,則可能 null
是。
- builder
- MigrationCommandListBuilder
用來建置命令的命令產生器。
適用於
Generate(AlterColumnOperation, IModel, MigrationCommandListBuilder)
擲回 , NotSupportedException 因為此作業需要尚未支援的資料表重建。
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(DropPrimaryKeyOperation, IModel, MigrationCommandListBuilder)
擲回 , NotSupportedException 因為此作業需要尚未支援的資料表重建。
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(AlterDatabaseOperation, IModel, MigrationCommandListBuilder)
在指定的 上呼叫 來建置所 MigrationCommandListBuilder 指定 AlterDatabaseOperation 的 命令。
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(CreateCheckConstraintOperation, IModel, MigrationCommandListBuilder)
擲回 , NotSupportedException 因為此作業需要尚未支援的資料表重建。
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.CreateCheckConstraintOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
override this.Generate : Microsoft.EntityFrameworkCore.Migrations.Operations.CreateCheckConstraintOperation * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
Protected Overrides Sub Generate (operation As CreateCheckConstraintOperation, model As IModel, builder As MigrationCommandListBuilder)
參數
- operation
- CreateCheckConstraintOperation
作業。
- model
- IModel
目標模型,如果作業不存在模型,則可能 null
是。
- builder
- MigrationCommandListBuilder
用來建置命令的命令產生器。
適用於
Generate(CreateSequenceOperation, IModel, MigrationCommandListBuilder)
擲回 , NotSupportedException 因為 SQLite 不支援序列。
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
用來建置命令的命令產生器。
適用於
Generate(CreateTableOperation, IModel, MigrationCommandListBuilder)
在指定的 上呼叫 來建置所 MigrationCommandListBuilder 指定 CreateTableOperation 的 命令。
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(DropIndexOperation, IModel, MigrationCommandListBuilder, Boolean)
在指定的 上呼叫 來建置所 MigrationCommandListBuilder 指定 DropIndexOperation 的 命令。
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(DropColumnOperation, IModel, MigrationCommandListBuilder)
擲回 , NotSupportedException 因為此作業需要尚未支援的資料表重建。
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)
擲回 , NotSupportedException 因為此作業需要尚未支援的資料表重建。
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(AlterSequenceOperation, IModel, MigrationCommandListBuilder)
擲回 , NotSupportedException 因為 SQLite 不支援序列。
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.AlterSequenceOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
protected override void Generate (Microsoft.EntityFrameworkCore.Migrations.Operations.AlterSequenceOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel? model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
override this.Generate : Microsoft.EntityFrameworkCore.Migrations.Operations.AlterSequenceOperation * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
Protected Overrides Sub Generate (operation As AlterSequenceOperation, model As IModel, builder As MigrationCommandListBuilder)
參數
- operation
- AlterSequenceOperation
作業。
- model
- IModel
目標模型,如果 null
作業不存在模型,則可能是 。
- builder
- MigrationCommandListBuilder
用來建置命令的命令產生器。
適用於
Generate(DropPrimaryKeyOperation, IModel, MigrationCommandListBuilder, Boolean)
擲回 , NotSupportedException 因為此作業需要尚未支援的資料表重建。
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 之後終止命令。