共用方式為


RelationalCollectionOwnershipBuilderExtensions.HasConstraintName 方法

定義

多載

HasConstraintName(CollectionOwnershipBuilder, String)

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

HasConstraintName<TEntity,TDependentEntity>(CollectionOwnershipBuilder<TEntity,TDependentEntity>, String)

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

HasConstraintName(CollectionOwnershipBuilder, String)

來源:
RelationalCollectionOwnershipBuilderExtensions.cs

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

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

參數

referenceReferenceBuilder
CollectionOwnershipBuilder

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

name
String

外鍵條件約束的名稱。

傳回

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

適用於

HasConstraintName<TEntity,TDependentEntity>(CollectionOwnershipBuilder<TEntity,TDependentEntity>, String)

來源:
RelationalCollectionOwnershipBuilderExtensions.cs

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

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

類型參數

TEntity

關聯性一端的實體類型。

TDependentEntity

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

參數

referenceReferenceBuilder
CollectionOwnershipBuilder<TEntity,TDependentEntity>

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

name
String

外鍵條件約束的名稱。

傳回

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

適用於