共用方式為


SqlServerReferenceCollectionBuilderExtensions.ForSqlServerHasConstraintName 方法

定義

多載

ForSqlServerHasConstraintName(ReferenceCollectionBuilder, String)

以 SQL Server 為目標時,設定此關聯性的外鍵條件約束名稱。

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

以 SQL Server 為目標時,設定此關聯性的外鍵條件約束名稱。

ForSqlServerHasConstraintName(ReferenceCollectionBuilder, String)

以 SQL Server 為目標時,設定此關聯性的外鍵條件約束名稱。

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

參數

referenceCollectionBuilder
ReferenceCollectionBuilder

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

name
String

外鍵條件約束的名稱。

傳回

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

適用於

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

以 SQL Server 為目標時,設定此關聯性的外鍵條件約束名稱。

public static Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder<TEntity,TRelatedEntity> ForSqlServerHasConstraintName<TEntity,TRelatedEntity> (this Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder<TEntity,TRelatedEntity> referenceCollectionBuilder, string name) where TEntity : class where TRelatedEntity : class;
static member ForSqlServerHasConstraintName : 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 ForSqlServerHasConstraintName(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>

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

適用於