IConventionForeignKeyBuilder.CanSetEntityTypes Method

Definition

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