RelationalOwnedNavigationBuilderExtensions.HasCheckConstraint 方法

定义

重载

HasCheckConstraint(OwnedNavigationBuilder, String, String)

在面向关系数据库时配置数据库检查约束。

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

在面向关系数据库时配置数据库检查约束。

HasCheckConstraint(OwnedNavigationBuilder, String, String)

在面向关系数据库时配置数据库检查约束。

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

参数

ownedNavigationBuilder
OwnedNavigationBuilder

所属类型的导航生成器。

name
String

检查约束的名称。

sql
String

检查约束中使用的逻辑约束 sql。

返回

用于进一步配置导航的生成器。

适用于

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

在面向关系数据库时配置数据库检查约束。

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)

类型参数

TEntity

拥有关系的实体类型。

TDependentEntity

关系的依赖实体类型。

参数

ownedNavigationBuilder
OwnedNavigationBuilder<TEntity,TDependentEntity>

所属类型的导航生成器。

name
String

检查约束的名称。

sql
String

检查约束中使用的逻辑约束 sql。

返回

OwnedNavigationBuilder<TEntity,TDependentEntity>

用于进一步配置导航的生成器。

适用于