IEntityType.FindClosestCommonParent(IEntityType) Method

Definition

Returns the closest entity type that is a parent of both given entity types. If one of the given entities is a parent of the other, that parent is returned. Returns null if the two entity types aren't in the same hierarchy.

public virtual Microsoft.EntityFrameworkCore.Metadata.IEntityType? FindClosestCommonParent (Microsoft.EntityFrameworkCore.Metadata.IEntityType otherEntityType);
abstract member FindClosestCommonParent : Microsoft.EntityFrameworkCore.Metadata.IEntityType -> Microsoft.EntityFrameworkCore.Metadata.IEntityType
override this.FindClosestCommonParent : Microsoft.EntityFrameworkCore.Metadata.IEntityType -> Microsoft.EntityFrameworkCore.Metadata.IEntityType
Public Overridable Function FindClosestCommonParent (otherEntityType As IEntityType) As IEntityType

Parameters

otherEntityType
IEntityType

Another entity type.

Returns

The closest common parent of this entity type and otherEntityType, or null if they have not common parent.

Applies to