Compartilhar via


MigrationsSqlGenerator.ForeignKeyConstraint Método

Definição

Gera um fragmento SQL para uma restrição de chave estrangeira de um AddForeignKeyOperation.

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

Parâmetros

operation
AddForeignKeyOperation

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