Condividi tramite


EntityTypeExtensions.GetClosestCommonParent(IEntityType, IEntityType) Metodo

Definizione

Attenzione

Use IReadOnlyEntityType.FindClosestCommonParent

Restituisce il tipo di entità più vicino padre di entrambi i tipi di entità specificati. Se una delle entità indicate è un elemento padre dell'altra, viene restituito tale elemento padre. Restituisce null se i due tipi di entità non si trovano nella stessa gerarchia.

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

Parametri

entityType1
IEntityType

Tipo di entità.

entityType2
IEntityType

Un altro tipo di entità.

Restituisce

Elemento padre comune più vicino di entityType1 e entityType2o Null se non hanno un padre comune.

Attributi

Si applica a