RelationalReferenceReferenceBuilderExtensions.HasConstraintName 方法

定义

重载

HasConstraintName(ReferenceReferenceBuilder, String)

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

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

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

HasConstraintName(ReferenceReferenceBuilder, String)

Source:
RelationalReferenceReferenceBuilderExtensions.cs
Source:
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)

Source:
RelationalReferenceReferenceBuilderExtensions.cs
Source:
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

外键约束的名称。

返回

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

适用于