다음을 통해 공유


EntityTypeExtensions.GetClosestCommonParent(IEntityType, IEntityType) 메서드

정의

주의

Use IReadOnlyEntityType.FindClosestCommonParent

지정된 엔터티 형식의 부모인 가장 가까운 엔터티 형식을 반환합니다. 지정된 엔터티 중 하나가 다른 엔터티의 부모인 경우 해당 부모가 반환됩니다. 두 엔터티 형식이 동일한 계층 구조에 없는 경우 를 반환 null 합니다.

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

다른 엔터티 형식입니다.

반환

및 의 entityType1 가장 가까운 공통 부모이거나 entityType2, 공통 부모가 없는 경우 null입니다.

특성

적용 대상