Partilhar via


MigrationsSqlGenerator.PrimaryKeyConstraint Método

Definição

Gera um fragmento SQL para uma restrição de chave primária de um AddPrimaryKeyOperation.

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)

Parâmetros

operation
AddPrimaryKeyOperation

A operação.

model
IModel

O modelo de destino que pode ser null se as operações existirem sem um modelo.

builder
MigrationCommandListBuilder

O construtor de comandos a ser usado para adicionar o fragmento sql.

Aplica-se a