Sdílet prostřednictvím


EntityTypeExtensions.GetClosestCommonParent(IEntityType, IEntityType) Metoda

Definice

Upozornění

Use IReadOnlyEntityType.FindClosestCommonParent

Vrátí nejbližší typ entity, který je nadřazený oběma daným typům entit. Pokud je jedna z daných entit nadřazená druhé entitě, vrátí se tento nadřazený objekt. Vrátí hodnotu null , pokud dva typy entit nejsou ve stejné hierarchii.

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

Parametry

entityType1
IEntityType

Typ entity.

entityType2
IEntityType

Jiný typ entity.

Návraty

Nejbližší společný nadřazený objekt entityType1 a nebo entityType2null, pokud nemají společný nadřazený objekt.

Atributy

Platí pro