RelationalForeignKeyBuilderExtensions.CanSetExcludeForeignKeyFromMigrations Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.
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.