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 為 。

適用於