共用方式為


RelationalReferenceCollectionBuilderExtensions.HasConstraintName 方法

定義

多載

HasConstraintName(ReferenceCollectionBuilder, String)

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

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

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

HasConstraintName(ReferenceCollectionBuilder, String)

來源:
RelationalReferenceCollectionBuilderExtensions.cs
來源:
RelationalReferenceCollectionBuilderExtensions.cs

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

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

參數

referenceCollectionBuilder
ReferenceCollectionBuilder

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

name
String

外鍵條件約束的名稱。

傳回

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

適用於

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

來源:
RelationalReferenceCollectionBuilderExtensions.cs
來源:
RelationalReferenceCollectionBuilderExtensions.cs

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

public static Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder<TEntity,TRelatedEntity> HasConstraintName<TEntity,TRelatedEntity> (this Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder<TEntity,TRelatedEntity> referenceCollectionBuilder, string name) where TEntity : class where TRelatedEntity : class;
static member HasConstraintName : Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder<'Entity, 'RelatedEntity (requires 'Entity : null and 'RelatedEntity : null)> * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder<'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) (referenceCollectionBuilder As ReferenceCollectionBuilder(Of TEntity, TRelatedEntity), name As String) As ReferenceCollectionBuilder(Of TEntity, TRelatedEntity)

類型參數

TEntity

此關聯性中的主體實體類型。

TRelatedEntity

此關聯性中的相依實體類型。

參數

referenceCollectionBuilder
ReferenceCollectionBuilder<TEntity,TRelatedEntity>

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

name
String

外鍵條件約束的名稱。

傳回

ReferenceCollectionBuilder<TEntity,TRelatedEntity>

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

適用於