Partager via


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

Définition

Configure une contrainte case activée sur la table.

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)

Paramètres

name
String

Nom de la contrainte.

sql
String

Expression sql utilisée dans la contrainte CHECK.

Retours

Le même générateur afin que plusieurs appels puissent être chaînés.

S’applique à