Aracılığıyla paylaş


EntityTypeExtensions.GetClosestCommonParent(IEntityType, IEntityType) Yöntem

Tanım

Dikkat

Use IReadOnlyEntityType.FindClosestCommonParent

Verilen her iki varlık türünün de üst öğesi olan en yakın varlık türünü döndürür. Verilen varlıklardan biri diğerinin üst öğesiyse, bu üst öğe döndürülür. İki varlık türü aynı hiyerarşide değilse döndürür null .

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

Parametreler

entityType1
IEntityType

Varlık türü.

entityType2
IEntityType

Başka bir varlık türü.

Döndürülenler

ve entityType2'in entityType1 en yakın ortak üst öğesi veya ortak üst öğeleri yoksa null.

Öznitelikler

Şunlara uygulanır