IConventionForeignKeyBuilder.CanSetEntityTypes 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 principal and dependent types can be switched or the relationship could be moved to a base type of one of the participating entity types.
public bool CanSetEntityTypes (Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType principalEntityType, Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType dependentEntityType, bool fromDataAnnotation = false);
abstract member CanSetEntityTypes : Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType * Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType * bool -> bool
Public Function CanSetEntityTypes (principalEntityType As IConventionEntityType, dependentEntityType As IConventionEntityType, Optional fromDataAnnotation As Boolean = false) As Boolean
Parameters
- principalEntityType
- IConventionEntityType
The principal entity type to set.
- dependentEntityType
- IConventionEntityType
The dependent entity type to set.
- fromDataAnnotation
- Boolean
Indicates whether the configuration was specified using a data annotation.
Returns
true
if the principal and dependent entity types can be switched or the relationship could
be moved to a base type of one of the participating entity types.
Applies to
Entity Framework