EntityTypeExtensions.GetDeclaredNavigations(IEntityType) 方法

定義

取得在指定 IEntityType 上宣告的所有導覽屬性。

這個方法不會傳回在基底類型上宣告的導覽屬性。 在逐一查看所有實體類型,以避免多次處理相同的導覽屬性時很有用。 使用 GetNavigations(IEntityType) 也會傳回在基底類型上宣告的導覽屬性。

public static System.Collections.Generic.IEnumerable<Microsoft.EntityFrameworkCore.Metadata.INavigation> GetDeclaredNavigations (this Microsoft.EntityFrameworkCore.Metadata.IEntityType entityType);
static member GetDeclaredNavigations : Microsoft.EntityFrameworkCore.Metadata.IEntityType -> seq<Microsoft.EntityFrameworkCore.Metadata.INavigation>
<Extension()>
Public Function GetDeclaredNavigations (entityType As IEntityType) As IEnumerable(Of INavigation)

參數

entityType
IEntityType

實體類型。

傳回

宣告的導覽屬性。

適用於