RelationalForeignKeyBuilderExtensions.CanSetConstraintName Method

Definition

Overloads

CanSetConstraintName(IConventionForeignKeyBuilder, String, Boolean)

Returns a value indicating whether the foreign key constraint name can be set for this relationship from the current configuration source

CanSetConstraintName(IConventionRelationshipBuilder, String, Boolean)

Returns a value indicating whether the foreign key constraint name can be set for this relationship from the current configuration source

CanSetConstraintName(IConventionForeignKeyBuilder, String, Boolean)

Returns a value indicating whether the foreign key constraint name can be set for this relationship from the current configuration source

public static bool CanSetConstraintName (this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionForeignKeyBuilder relationship, string name, bool fromDataAnnotation = false);
public static bool CanSetConstraintName (this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionForeignKeyBuilder relationship, string? name, bool fromDataAnnotation = false);
static member CanSetConstraintName : Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionForeignKeyBuilder * string * bool -> bool
<Extension()>
Public Function CanSetConstraintName (relationship As IConventionForeignKeyBuilder, name As String, Optional fromDataAnnotation As Boolean = false) As Boolean

Parameters

relationship
IConventionForeignKeyBuilder

The builder being used to configure the relationship.

name
String

The name of the foreign key constraint.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

true if the configuration can be applied.

Remarks

See Modeling entity types and relationships for more information and examples.

Applies to

CanSetConstraintName(IConventionRelationshipBuilder, String, Boolean)

Returns a value indicating whether the foreign key constraint name can be set for this relationship from the current configuration source

public static bool CanSetConstraintName (this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionRelationshipBuilder relationship, string name, bool fromDataAnnotation = false);
static member CanSetConstraintName : Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionRelationshipBuilder * string * bool -> bool
<Extension()>
Public Function CanSetConstraintName (relationship As IConventionRelationshipBuilder, name As String, Optional fromDataAnnotation As Boolean = false) As Boolean

Parameters

relationship
IConventionRelationshipBuilder

The builder being used to configure the relationship.

name
String

The name of the foreign key constraint.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

true if the configuration can be applied.

Applies to