共用方式為


MigrationsSqlGenerator.CreateTableForeignKeys 方法

定義

為 的 CreateTableOperation 外鍵條件約束產生 SQL 片段。

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

參數

operation
CreateTableOperation

作業。

model
IModel

目標模型,如果 null 作業不存在模型,則可能是 。

builder
MigrationCommandListBuilder

用來加入 SQL 片段的命令產生器。

適用於