Compartilhar via


MigrationsSqlGenerator.UniqueConstraint Método

Definição

Gera um fragmento SQL para uma restrição exclusiva de um 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)

Parâmetros

operation
AddUniqueConstraintOperation

A operação.

model
IModel

O modelo de destino que pode ser null se as operações existirem sem um modelo.

builder
MigrationCommandListBuilder

O construtor de comandos a ser usado para adicionar o fragmento SQL.

Aplica-se a