RelationalCollectionOwnershipBuilderExtensions.HasConstraintName 方法

定义

重载

HasConstraintName(CollectionOwnershipBuilder, String)

面向关系数据库时,为此关系配置外键约束名称。

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

面向关系数据库时,为此关系配置外键约束名称。

HasConstraintName(CollectionOwnershipBuilder, String)

面向关系数据库时,为此关系配置外键约束名称。

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)

面向关系数据库时,为此关系配置外键约束名称。

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

外键约束的名称。

返回

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

适用于