共用方式為


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>

進一步設定導覽的建置者。

適用於