Udostępnij za pośrednictwem


MigrationsSqlGenerator.ForeignKeyConstraint Metoda

Definicja

Generuje fragment SQL dla ograniczenia klucza obcego elementu 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)

Parametry

operation
AddForeignKeyOperation

Operacja.

model
IModel

Model docelowy, który może mieć wartość null , jeśli operacje istnieją bez modelu.

builder
MigrationCommandListBuilder

Konstruktor poleceń używany do dodawania fragmentu SQL.

Dotyczy