Поделиться через


MigrationsSqlGenerator.UniqueConstraint Метод

Определение

Создает фрагмент SQL для ограничения уникальности AddUniqueConstraintOperationобъекта .

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.

Применяется к