Udostępnij przez


EntityTypeExtensions.GetClosestCommonParent(IEntityType, IEntityType) Metoda

Definicja

Przestroga

Use IReadOnlyEntityType.FindClosestCommonParent

Zwraca najbliższy typ jednostki, który jest elementem nadrzędnym obu typów jednostek. Jeśli jedna z podanych jednostek jest elementem nadrzędnym drugiego, zwracany jest ten element nadrzędny. Zwraca wartość null , jeśli dwa typy jednostek nie są w tej samej 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 jednostki.

entityType2
IEntityType

Inny typ jednostki.

Zwraca

Najbliższy wspólny element nadrzędny elementów entityType1 i entityType2lub o wartości null, jeśli nie mają wspólnego elementu nadrzędnego.

Atrybuty

Dotyczy