RelationalReferenceReferenceBuilderExtensions.HasConstraintName Method

Definition

Overloads

HasConstraintName(ReferenceReferenceBuilder, String)

Configures the foreign key constraint name for this relationship when targeting a relational database.

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

Configures the foreign key constraint name for this relationship when targeting a relational database.

HasConstraintName(ReferenceReferenceBuilder, String)

Configures the foreign key constraint name for this relationship when targeting a relational database.

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

Parameters

referenceReferenceBuilder
ReferenceReferenceBuilder

The builder being used to configure the relationship.

name
String

The name of the foreign key constraint.

Returns

The same builder instance so that multiple calls can be chained.

Applies to

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

Configures the foreign key constraint name for this relationship when targeting a relational database.

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)

Type Parameters

TEntity

The entity type on one end of the relationship.

TRelatedEntity

The entity type on the other end of the relationship.

Parameters

referenceReferenceBuilder
ReferenceReferenceBuilder<TEntity,TRelatedEntity>

The builder being used to configure the relationship.

name
String

The name of the foreign key constraint.

Returns

The same builder instance so that multiple calls can be chained.

Applies to