共用方式為


SqlServerMigrationsSqlGenerator.IndexTraits 方法

定義

CreateIndexOperationAddPrimaryKeyOperationAddUniqueConstraintOperation 產生索引特性的 SQL 片段。

protected override void IndexTraits (Microsoft.EntityFrameworkCore.Migrations.Operations.MigrationOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
protected override void IndexTraits (Microsoft.EntityFrameworkCore.Migrations.Operations.MigrationOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel? model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
override this.IndexTraits : Microsoft.EntityFrameworkCore.Migrations.Operations.MigrationOperation * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
Protected Overrides Sub IndexTraits (operation As MigrationOperation, model As IModel, builder As MigrationCommandListBuilder)

參數

operation
MigrationOperation

作業。

model
IModel

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

builder
MigrationCommandListBuilder

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

適用於