IMutableEntityType.FindClosestCommonParent(IReadOnlyEntityType) 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.IMutableEntityType? FindClosestCommonParent (Microsoft.EntityFrameworkCore.Metadata.IReadOnlyEntityType otherEntityType);
abstract member FindClosestCommonParent : Microsoft.EntityFrameworkCore.Metadata.IReadOnlyEntityType -> Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType
override this.FindClosestCommonParent : Microsoft.EntityFrameworkCore.Metadata.IReadOnlyEntityType -> Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType
Public Overridable Function FindClosestCommonParent (otherEntityType As IReadOnlyEntityType) As IMutableEntityType

Parameters

otherEntityType
IReadOnlyEntityType

Another entity type.

Returns

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

Applies to