RelationalForeignKeyBuilderExtensions.ExcludeForeignKeyFromMigrations 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.
Overloads
| Name | Description |
|---|---|
| ExcludeForeignKeyFromMigrations(OwnershipBuilder, Boolean) |
Configures whether the foreign key constraint is excluded from migrations when targeting a relational database. |
| ExcludeForeignKeyFromMigrations(ReferenceCollectionBuilder, Boolean) |
Configures whether the foreign key constraint is excluded from migrations when targeting a relational database. |
| ExcludeForeignKeyFromMigrations(ReferenceReferenceBuilder, Boolean) |
Configures whether the foreign key constraint is excluded from migrations when targeting a relational database. |
| ExcludeForeignKeyFromMigrations(IConventionForeignKeyBuilder, Nullable<Boolean>, Boolean) |
Configures whether the foreign key constraint is excluded from migrations when targeting a relational database. |
| ExcludeForeignKeyFromMigrations<TEntity,TDependentEntity>(OwnershipBuilder<TEntity,TDependentEntity>, Boolean) |
Configures whether the foreign key constraint is excluded from migrations when targeting a relational database. |
| ExcludeForeignKeyFromMigrations<TEntity,TRelatedEntity>(ReferenceReferenceBuilder<TEntity,TRelatedEntity>, Boolean) |
Configures whether the foreign key constraint is excluded from migrations when targeting a relational database. |
| ExcludeForeignKeyFromMigrations<TEntity,TRelatedEntity>(ReferenceCollectionBuilder<TEntity,TRelatedEntity>, Boolean) |
Configures whether the foreign key constraint is excluded from migrations when targeting a relational database. |
ExcludeForeignKeyFromMigrations(OwnershipBuilder, Boolean)
Configures whether the foreign key constraint is excluded from migrations when targeting a relational database.
public static Microsoft.EntityFrameworkCore.Metadata.Builders.OwnershipBuilder ExcludeForeignKeyFromMigrations(this Microsoft.EntityFrameworkCore.Metadata.Builders.OwnershipBuilder ownershipBuilder, bool excluded = true);
static member ExcludeForeignKeyFromMigrations : Microsoft.EntityFrameworkCore.Metadata.Builders.OwnershipBuilder * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.OwnershipBuilder
<Extension()>
Public Function ExcludeForeignKeyFromMigrations (ownershipBuilder As OwnershipBuilder, Optional excluded As Boolean = true) As OwnershipBuilder
Parameters
- ownershipBuilder
- OwnershipBuilder
The builder being used to configure the relationship.
- excluded
- Boolean
A value indicating whether the foreign key constraint is excluded from migrations.
Returns
The same builder instance so that multiple calls can be chained.
Remarks
See Modeling entity types and relationships for more information and examples.
Applies to
ExcludeForeignKeyFromMigrations(ReferenceCollectionBuilder, Boolean)
Configures whether the foreign key constraint is excluded from migrations when targeting a relational database.
public static Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder ExcludeForeignKeyFromMigrations(this Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder referenceCollectionBuilder, bool excluded = true);
static member ExcludeForeignKeyFromMigrations : Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder
<Extension()>
Public Function ExcludeForeignKeyFromMigrations (referenceCollectionBuilder As ReferenceCollectionBuilder, Optional excluded As Boolean = true) As ReferenceCollectionBuilder
Parameters
- referenceCollectionBuilder
- ReferenceCollectionBuilder
The builder being used to configure the relationship.
- excluded
- Boolean
A value indicating whether the foreign key constraint is excluded from migrations.
Returns
The same builder instance so that multiple calls can be chained.
Remarks
See Modeling entity types and relationships for more information and examples.
Applies to
ExcludeForeignKeyFromMigrations(ReferenceReferenceBuilder, Boolean)
Configures whether the foreign key constraint is excluded from migrations when targeting a relational database.
public static Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceReferenceBuilder ExcludeForeignKeyFromMigrations(this Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceReferenceBuilder referenceReferenceBuilder, bool excluded = true);
static member ExcludeForeignKeyFromMigrations : Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceReferenceBuilder * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceReferenceBuilder
<Extension()>
Public Function ExcludeForeignKeyFromMigrations (referenceReferenceBuilder As ReferenceReferenceBuilder, Optional excluded As Boolean = true) As ReferenceReferenceBuilder
Parameters
- referenceReferenceBuilder
- ReferenceReferenceBuilder
The builder being used to configure the relationship.
- excluded
- Boolean
A value indicating whether the foreign key constraint is excluded from migrations.
Returns
The same builder instance so that multiple calls can be chained.
Remarks
See Modeling entity types and relationships for more information and examples.
Applies to
ExcludeForeignKeyFromMigrations(IConventionForeignKeyBuilder, Nullable<Boolean>, Boolean)
Configures whether the foreign key constraint is excluded from migrations when targeting a relational database.
public static Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionForeignKeyBuilder? ExcludeForeignKeyFromMigrations(this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionForeignKeyBuilder relationship, bool? excluded, bool fromDataAnnotation = false);
static member ExcludeForeignKeyFromMigrations : Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionForeignKeyBuilder * Nullable<bool> * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionForeignKeyBuilder
<Extension()>
Public Function ExcludeForeignKeyFromMigrations (relationship As IConventionForeignKeyBuilder, excluded As Nullable(Of Boolean), Optional fromDataAnnotation As Boolean = false) As IConventionForeignKeyBuilder
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
The same builder instance if the configuration was applied,
null otherwise.
Remarks
See Modeling entity types and relationships for more information and examples.
Applies to
ExcludeForeignKeyFromMigrations<TEntity,TDependentEntity>(OwnershipBuilder<TEntity,TDependentEntity>, Boolean)
Configures whether the foreign key constraint is excluded from migrations when targeting a relational database.
public static Microsoft.EntityFrameworkCore.Metadata.Builders.OwnershipBuilder<TEntity,TDependentEntity> ExcludeForeignKeyFromMigrations<TEntity,TDependentEntity>(this Microsoft.EntityFrameworkCore.Metadata.Builders.OwnershipBuilder<TEntity,TDependentEntity> ownershipBuilder, bool excluded = true) where TEntity : class where TDependentEntity : class;
static member ExcludeForeignKeyFromMigrations : Microsoft.EntityFrameworkCore.Metadata.Builders.OwnershipBuilder<'Entity, 'DependentEntity (requires 'Entity : null and 'DependentEntity : null)> * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.OwnershipBuilder<'Entity, 'DependentEntity (requires 'Entity : null and 'DependentEntity : null)> (requires 'Entity : null and 'DependentEntity : null)
<Extension()>
Public Function ExcludeForeignKeyFromMigrations(Of TEntity As Class, TDependentEntity As Class) (ownershipBuilder As OwnershipBuilder(Of TEntity, TDependentEntity), Optional excluded As Boolean = true) As OwnershipBuilder(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
- ownershipBuilder
- OwnershipBuilder<TEntity,TDependentEntity>
The builder being used to configure the relationship.
- excluded
- Boolean
A value indicating whether the foreign key constraint is excluded from migrations.
Returns
The same builder instance so that multiple calls can be chained.
Remarks
See Modeling entity types and relationships for more information and examples.
Applies to
ExcludeForeignKeyFromMigrations<TEntity,TRelatedEntity>(ReferenceReferenceBuilder<TEntity,TRelatedEntity>, Boolean)
Configures whether the foreign key constraint is excluded from migrations when targeting a relational database.
public static Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceReferenceBuilder<TEntity,TRelatedEntity> ExcludeForeignKeyFromMigrations<TEntity,TRelatedEntity>(this Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceReferenceBuilder<TEntity,TRelatedEntity> referenceReferenceBuilder, bool excluded = true) where TEntity : class where TRelatedEntity : class;
static member ExcludeForeignKeyFromMigrations : Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceReferenceBuilder<'Entity, 'RelatedEntity (requires 'Entity : null and 'RelatedEntity : null)> * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceReferenceBuilder<'Entity, 'RelatedEntity (requires 'Entity : null and 'RelatedEntity : null)> (requires 'Entity : null and 'RelatedEntity : null)
<Extension()>
Public Function ExcludeForeignKeyFromMigrations(Of TEntity As Class, TRelatedEntity As Class) (referenceReferenceBuilder As ReferenceReferenceBuilder(Of TEntity, TRelatedEntity), Optional excluded As Boolean = true) As ReferenceReferenceBuilder(Of TEntity, TRelatedEntity)
Type Parameters
- TEntity
The entity type on one end of the relationship.
- TRelatedEntity
The entity type on the other end of the relationship.
Parameters
- referenceReferenceBuilder
- ReferenceReferenceBuilder<TEntity,TRelatedEntity>
The builder being used to configure the relationship.
- excluded
- Boolean
A value indicating whether the foreign key constraint is excluded from migrations.
Returns
The same builder instance so that multiple calls can be chained.
Remarks
See Modeling entity types and relationships for more information and examples.
Applies to
ExcludeForeignKeyFromMigrations<TEntity,TRelatedEntity>(ReferenceCollectionBuilder<TEntity,TRelatedEntity>, Boolean)
Configures whether the foreign key constraint is excluded from migrations when targeting a relational database.
public static Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder<TEntity,TRelatedEntity> ExcludeForeignKeyFromMigrations<TEntity,TRelatedEntity>(this Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder<TEntity,TRelatedEntity> referenceCollectionBuilder, bool excluded = true) where TEntity : class where TRelatedEntity : class;
static member ExcludeForeignKeyFromMigrations : Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder<'Entity, 'RelatedEntity (requires 'Entity : null and 'RelatedEntity : null)> * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder<'Entity, 'RelatedEntity (requires 'Entity : null and 'RelatedEntity : null)> (requires 'Entity : null and 'RelatedEntity : null)
<Extension()>
Public Function ExcludeForeignKeyFromMigrations(Of TEntity As Class, TRelatedEntity As Class) (referenceCollectionBuilder As ReferenceCollectionBuilder(Of TEntity, TRelatedEntity), Optional excluded As Boolean = true) 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.
- excluded
- Boolean
A value indicating whether the foreign key constraint is excluded from migrations.
Returns
The same builder instance so that multiple calls can be chained.
Remarks
See Modeling entity types and relationships for more information and examples.