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>

同一生成器实例,以便可以链接多个调用。

适用于