MigrationsSqlGenerator.PrimaryKeyConstraint 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
為 的主鍵條件約束 AddPrimaryKeyOperation 產生 SQL 片段。
protected virtual void PrimaryKeyConstraint (Microsoft.EntityFrameworkCore.Migrations.Operations.AddPrimaryKeyOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
protected virtual void PrimaryKeyConstraint (Microsoft.EntityFrameworkCore.Migrations.Operations.AddPrimaryKeyOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel? model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
abstract member PrimaryKeyConstraint : Microsoft.EntityFrameworkCore.Migrations.Operations.AddPrimaryKeyOperation * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
override this.PrimaryKeyConstraint : Microsoft.EntityFrameworkCore.Migrations.Operations.AddPrimaryKeyOperation * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
Protected Overridable Sub PrimaryKeyConstraint (operation As AddPrimaryKeyOperation, model As IModel, builder As MigrationCommandListBuilder)
參數
- operation
- AddPrimaryKeyOperation
作業。
- model
- IModel
目標模型,如果 null
作業不存在模型,則可能是 。
- builder
- MigrationCommandListBuilder
用來加入 SQL 片段的命令產生器。