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

適用於