IReadOnlyEntityType.FindClosestCommonParent(IReadOnlyEntityType) 方法

定义

返回最接近的实体类型,该类型是两个给定实体类型的父级。 如果其中一个给定实体是另一个实体的父实体,则返回该父实体。 null如果两个实体类型不在同一层次结构中,则返回 。

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

参数

otherEntityType
IReadOnlyEntityType

另一个实体类型。

返回

此实体类型 和 otherEntityType的最接近的公共父级,如果 null 它们没有公共父级,则为 。

适用于