Delen via


RelationalReferenceCollectionBuilderExtensions.HasConstraintName Method

Definition

Overloads

HasConstraintName(ReferenceCollectionBuilder, String)

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

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

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

HasConstraintName(ReferenceCollectionBuilder, String)

Source:
RelationalReferenceCollectionBuilderExtensions.cs
Source:
RelationalReferenceCollectionBuilderExtensions.cs

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

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

Parameters

referenceCollectionBuilder
ReferenceCollectionBuilder

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

Source:
RelationalReferenceCollectionBuilderExtensions.cs
Source:
RelationalReferenceCollectionBuilderExtensions.cs

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

public static Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder<TEntity,TRelatedEntity> HasConstraintName<TEntity,TRelatedEntity> (this Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder<TEntity,TRelatedEntity> referenceCollectionBuilder, string name) where TEntity : class where TRelatedEntity : class;
static member HasConstraintName : 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 HasConstraintName(Of TEntity As Class, TRelatedEntity As Class) (referenceCollectionBuilder As ReferenceCollectionBuilder(Of TEntity, TRelatedEntity), name As String) As ReferenceCollectionBuilder(Of TEntity, TRelatedEntity)

Type Parameters

TEntity

The principal entity type in this relationship.

TRelatedEntity

The dependent entity type in this relationship.

Parameters

referenceCollectionBuilder
ReferenceCollectionBuilder<TEntity,TRelatedEntity>

The builder being used to configure the relationship.

name
String

The name of the foreign key constraint.

Returns

ReferenceCollectionBuilder<TEntity,TRelatedEntity>

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

Applies to