Lenguaje

RelationalForeignKeyBuilderExtensions.CanSetExcludeForeignKeyFromMigrations Method

Definition

Returns a value indicating whether the foreign key constraint exclusion from migrations can be set from the current configuration source.

public static bool CanSetExcludeForeignKeyFromMigrations(this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionForeignKeyBuilder relationship, bool? excluded, bool fromDataAnnotation = false);
static member CanSetExcludeForeignKeyFromMigrations : Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionForeignKeyBuilder * Nullable<bool> * bool -> bool
<Extension()>
Public Function CanSetExcludeForeignKeyFromMigrations (relationship As IConventionForeignKeyBuilder, excluded As Nullable(Of Boolean), Optional fromDataAnnotation As Boolean = false) As Boolean

Parameters

relationship
IConventionForeignKeyBuilder

The builder being used to configure the relationship.

excluded
Nullable<Boolean>

A value indicating whether the foreign key constraint is excluded from migrations.

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