IEntityType.FindClosestCommonParent(IEntityType) 方法

定义

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

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

参数

otherEntityType
IEntityType

另一个实体类型。

返回

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

适用于