EntityTypeExtensions.GetClosestCommonParent(IEntityType, IEntityType) Méthode

Définition

Attention

Use IReadOnlyEntityType.FindClosestCommonParent

Retourne le type d’entité le plus proche qui est un parent des deux types d’entités donnés. Si l’une des entités données est un parent de l’autre, ce parent est retourné. Retourne null si les deux types d’entités ne sont pas dans la même hiérarchie.

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

Paramètres

entityType1
IEntityType

Type d'entité.

entityType2
IEntityType

Autre type d’entité.

Retours

Parent commun le plus proche de entityType1 et entityType2, ou null s’ils n’ont pas de parent commun.

Attributs

S’applique à