语言

MigrationsSqlGenerator.CreateTablePrimaryKeyConstraint 方法

定义

为主键约束 CreateTableOperation生成 SQL 片段。

protected virtual void CreateTablePrimaryKeyConstraint(Microsoft.EntityFrameworkCore.Migrations.Operations.CreateTableOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel? model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
protected virtual void CreateTablePrimaryKeyConstraint(Microsoft.EntityFrameworkCore.Migrations.Operations.CreateTableOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
abstract member CreateTablePrimaryKeyConstraint : Microsoft.EntityFrameworkCore.Migrations.Operations.CreateTableOperation * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
override this.CreateTablePrimaryKeyConstraint : Microsoft.EntityFrameworkCore.Migrations.Operations.CreateTableOperation * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
Protected Overridable Sub CreateTablePrimaryKeyConstraint (operation As CreateTableOperation, model As IModel, builder As MigrationCommandListBuilder)

参数

operation
CreateTableOperation

操作。

model
IModel

目标模型,如果 null 操作不存在,则为没有模型。

builder
MigrationCommandListBuilder

用于添加 SQL 片段的命令生成器。

适用于