EntityTypeExtensions.GetClosestCommonParent(IEntityType, IEntityType) Methode

Definition

Achtung

Use IReadOnlyEntityType.FindClosestCommonParent

Gibt den nächstgelegenen Entitätstyp zurück, der ein übergeordnetes Element beider Entitätstypen ist. Wenn eine der angegebenen Entitäten ein übergeordnetes Element der anderen ist, wird dieses übergeordnete Element zurückgegeben. Gibt zurück null , wenn sich die beiden Entitätstypen nicht in derselben Hierarchie befinden.

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

Parameter

entityType1
IEntityType

Ein Entitätstyp.

entityType2
IEntityType

Ein anderer Entitätstyp.

Gibt zurück

Das nächstgelegene gemeinsame übergeordnete Element von und oder entityType2NULL, wenn sie nicht über ein gemeinsames übergeordnetes entityType1 Element verfügen.

Attribute

Gilt für: