Partilhar via


CreateTableBuilder<TColumns>.CheckConstraint(String, String) Método

Definição

Configura uma restrição de marcar na tabela.

public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.CreateCheckConstraintOperation> CheckConstraint (string name, string sql);
public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AddCheckConstraintOperation> CheckConstraint (string name, string sql);
abstract member CheckConstraint : string * string -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.CreateCheckConstraintOperation>
override this.CheckConstraint : string * string -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.CreateCheckConstraintOperation>
abstract member CheckConstraint : string * string -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AddCheckConstraintOperation>
override this.CheckConstraint : string * string -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AddCheckConstraintOperation>
Public Overridable Function CheckConstraint (name As String, sql As String) As OperationBuilder(Of CreateCheckConstraintOperation)
Public Overridable Function CheckConstraint (name As String, sql As String) As OperationBuilder(Of AddCheckConstraintOperation)

Parâmetros

name
String

O nome da restrição.

sql
String

A expressão sql usada na restrição CHECK.

Retornos

O mesmo construtor para que várias chamadas possam ser encadeadas.

Aplica-se a