RelationalOwnedNavigationBuilderExtensions.HasCheckConstraint Method

Definition

Overloads

HasCheckConstraint(OwnedNavigationBuilder, String, String)

Configures a database check constraint when targeting a relational database.

HasCheckConstraint<TEntity,TDependentEntity>(OwnedNavigationBuilder<TEntity,TDependentEntity>, String, String)

Configures a database check constraint when targeting a relational database.

HasCheckConstraint(OwnedNavigationBuilder, String, String)

Configures a database check constraint when targeting a relational database.

public static Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder HasCheckConstraint (this Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder ownedNavigationBuilder, string name, string sql);
static member HasCheckConstraint : Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder * string * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder
<Extension()>
Public Function HasCheckConstraint (ownedNavigationBuilder As OwnedNavigationBuilder, name As String, sql As String) As OwnedNavigationBuilder

Parameters

ownedNavigationBuilder
OwnedNavigationBuilder

The navigation builder for the owned type.

name
String

The name of the check constraint.

sql
String

The logical constraint sql used in the check constraint.

Returns

A builder to further configure the navigation.

Applies to

HasCheckConstraint<TEntity,TDependentEntity>(OwnedNavigationBuilder<TEntity,TDependentEntity>, String, String)

Configures a database check constraint when targeting a relational database.

public static Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<TEntity,TDependentEntity> HasCheckConstraint<TEntity,TDependentEntity> (this Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<TEntity,TDependentEntity> ownedNavigationBuilder, string name, string sql) where TEntity : class where TDependentEntity : class;
static member HasCheckConstraint : Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<'Entity, 'DependentEntity (requires 'Entity : null and 'DependentEntity : null)> * string * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<'Entity, 'DependentEntity (requires 'Entity : null and 'DependentEntity : null)> (requires 'Entity : null and 'DependentEntity : null)
<Extension()>
Public Function HasCheckConstraint(Of TEntity As Class, TDependentEntity As Class) (ownedNavigationBuilder As OwnedNavigationBuilder(Of TEntity, TDependentEntity), name As String, sql As String) As OwnedNavigationBuilder(Of TEntity, TDependentEntity)

Type Parameters

TEntity

The entity type owning the relationship.

TDependentEntity

The dependent entity type of the relationship.

Parameters

ownedNavigationBuilder
OwnedNavigationBuilder<TEntity,TDependentEntity>

The navigation builder for the owned type.

name
String

The name of the check constraint.

sql
String

The logical constraint sql used in the check constraint.

Returns

OwnedNavigationBuilder<TEntity,TDependentEntity>

A builder to further configure the navigation.

Applies to