Share via


RelationalCollectionOwnershipBuilderExtensions.HasConstraintName Method

Definition

Overloads

HasConstraintName(CollectionOwnershipBuilder, String)

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

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

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

HasConstraintName(CollectionOwnershipBuilder, String)

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

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

Parameters

referenceReferenceBuilder
CollectionOwnershipBuilder

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,TDependentEntity>(CollectionOwnershipBuilder<TEntity,TDependentEntity>, String)

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

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)

Type Parameters

TEntity

The entity type on one end of the relationship.

TDependentEntity

The entity type on the other end of the relationship.

Parameters

referenceReferenceBuilder
CollectionOwnershipBuilder<TEntity,TDependentEntity>

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