Share via


RelationalReferenceOwnershipBuilderExtensions.HasConstraintName Method

Definition

Overloads

HasConstraintName(ReferenceOwnershipBuilder, String)

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

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

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

HasConstraintName(ReferenceOwnershipBuilder, String)

Source:
RelationalReferenceOwnershipBuilderExtensions.cs
Source:
RelationalReferenceOwnershipBuilderExtensions.cs

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

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

Parameters

referenceReferenceBuilder
ReferenceOwnershipBuilder

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>(ReferenceOwnershipBuilder<TEntity,TRelatedEntity>, String)

Source:
RelationalReferenceOwnershipBuilderExtensions.cs
Source:
RelationalReferenceOwnershipBuilderExtensions.cs

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

public static Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceOwnershipBuilder<TEntity,TRelatedEntity> HasConstraintName<TEntity,TRelatedEntity> (this Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceOwnershipBuilder<TEntity,TRelatedEntity> referenceReferenceBuilder, string name) where TEntity : class where TRelatedEntity : class;
static member HasConstraintName : Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceOwnershipBuilder<'Entity, 'RelatedEntity (requires 'Entity : null and 'RelatedEntity : null)> * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceOwnershipBuilder<'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 ReferenceOwnershipBuilder(Of TEntity, TRelatedEntity), name As String) As ReferenceOwnershipBuilder(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
ReferenceOwnershipBuilder<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