Share via


EntityTypeExtensions.GetClosestCommonParent(IEntityType, IEntityType) メソッド

定義

注意事項

Use IReadOnlyEntityType.FindClosestCommonParent

指定された両方のエンティティ型の親である最も近いエンティティ型を返します。 指定されたエンティティの 1 つが他方の親である場合、その親が返されます。 null 2 つのエンティティ型が同じ階層にない場合は を返します。

public static Microsoft.EntityFrameworkCore.Metadata.IEntityType GetClosestCommonParent (this Microsoft.EntityFrameworkCore.Metadata.IEntityType entityType1, Microsoft.EntityFrameworkCore.Metadata.IEntityType entityType2);
[System.Obsolete("Use IReadOnlyEntityType.FindClosestCommonParent")]
public static Microsoft.EntityFrameworkCore.Metadata.IEntityType? GetClosestCommonParent (this Microsoft.EntityFrameworkCore.Metadata.IEntityType entityType1, Microsoft.EntityFrameworkCore.Metadata.IEntityType entityType2);
static member GetClosestCommonParent : Microsoft.EntityFrameworkCore.Metadata.IEntityType * Microsoft.EntityFrameworkCore.Metadata.IEntityType -> Microsoft.EntityFrameworkCore.Metadata.IEntityType
[<System.Obsolete("Use IReadOnlyEntityType.FindClosestCommonParent")>]
static member GetClosestCommonParent : Microsoft.EntityFrameworkCore.Metadata.IEntityType * Microsoft.EntityFrameworkCore.Metadata.IEntityType -> Microsoft.EntityFrameworkCore.Metadata.IEntityType
<Extension()>
Public Function GetClosestCommonParent (entityType1 As IEntityType, entityType2 As IEntityType) As IEntityType

パラメーター

entityType1
IEntityType

エンティティ型。

entityType2
IEntityType

別のエンティティ型。

戻り値

entityType2の最も近い共通親。共通のentityType1親がない場合は null。

属性

適用対象