共用方式為


RelationalReferenceReferenceBuilderExtensions.HasConstraintName 方法

定義

多載

HasConstraintName(ReferenceReferenceBuilder, String)

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

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

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

HasConstraintName(ReferenceReferenceBuilder, String)

來源:
RelationalReferenceReferenceBuilderExtensions.cs
來源:
RelationalReferenceReferenceBuilderExtensions.cs

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

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

參數

referenceReferenceBuilder
ReferenceReferenceBuilder

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

name
String

外鍵條件約束的名稱。

傳回

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

適用於

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

來源:
RelationalReferenceReferenceBuilderExtensions.cs
來源:
RelationalReferenceReferenceBuilderExtensions.cs

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

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

類型參數

TEntity

關聯性一端的實體類型。

TRelatedEntity

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

參數

referenceReferenceBuilder
ReferenceReferenceBuilder<TEntity,TRelatedEntity>

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

name
String

外鍵條件約束的名稱。

傳回

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

適用於