MigrationsSqlGenerator.UniqueConstraint 方法

定义

为 的唯一约束 AddUniqueConstraintOperation生成 SQL 片段。

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

参数

operation
AddUniqueConstraintOperation

操作。

model
IModel

如果不存在模型的操作,则 null 为 的目标模型。

builder
MigrationCommandListBuilder

用于添加 SQL 片段的命令生成器。

适用于