共用方式為


RelationalReferenceOwnershipBuilderExtensions.HasConstraintName 方法

定義

多載

HasConstraintName(ReferenceOwnershipBuilder, String)

以關係資料庫為目標時,設定此關聯性的外鍵條件約束名稱。

HasConstraintName<TEntity,TRelatedEntity>(ReferenceOwnershipBuilder<TEntity,TRelatedEntity>, String)

以關係資料庫為目標時,設定此關聯性的外鍵條件約束名稱。

HasConstraintName(ReferenceOwnershipBuilder, String)

來源:
RelationalReferenceOwnershipBuilderExtensions.cs
來源:
RelationalReferenceOwnershipBuilderExtensions.cs

以關係資料庫為目標時,設定此關聯性的外鍵條件約束名稱。

public static Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceOwnershipBuilder HasConstraintName (this Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceOwnershipBuilder referenceReferenceBuilder, string name);
static member HasConstraintName : Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceOwnershipBuilder * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceOwnershipBuilder
<Extension()>
Public Function HasConstraintName (referenceReferenceBuilder As ReferenceOwnershipBuilder, name As String) As ReferenceOwnershipBuilder

參數

referenceReferenceBuilder
ReferenceOwnershipBuilder

用來設定關聯性的產生器。

name
String

外鍵條件約束的名稱。

傳回

相同的產生器實例,以便鏈結多個呼叫。

適用於

HasConstraintName<TEntity,TRelatedEntity>(ReferenceOwnershipBuilder<TEntity,TRelatedEntity>, String)

來源:
RelationalReferenceOwnershipBuilderExtensions.cs
來源:
RelationalReferenceOwnershipBuilderExtensions.cs

以關係資料庫為目標時,設定此關聯性的外鍵條件約束名稱。

public static Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceOwnershipBuilder<TEntity,TRelatedEntity> HasConstraintName<TEntity,TRelatedEntity> (this Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceOwnershipBuilder<TEntity,TRelatedEntity> referenceReferenceBuilder, string name) where TEntity : class where TRelatedEntity : class;
static member HasConstraintName : Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceOwnershipBuilder<'Entity, 'RelatedEntity (requires 'Entity : null and 'RelatedEntity : null)> * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceOwnershipBuilder<'Entity, 'RelatedEntity (requires 'Entity : null and 'RelatedEntity : null)> (requires 'Entity : null and 'RelatedEntity : null)
<Extension()>
Public Function HasConstraintName(Of TEntity As Class, TRelatedEntity As Class) (referenceReferenceBuilder As ReferenceOwnershipBuilder(Of TEntity, TRelatedEntity), name As String) As ReferenceOwnershipBuilder(Of TEntity, TRelatedEntity)

類型參數

TEntity

關聯性一端的實體類型。

TRelatedEntity

關聯性另一端的實體類型。

參數

referenceReferenceBuilder
ReferenceOwnershipBuilder<TEntity,TRelatedEntity>

用來設定關聯性的產生器。

name
String

外鍵條件約束的名稱。

傳回

相同的產生器實例,以便鏈結多個呼叫。

適用於