EntityTypeExtensions.GetDeclaredProperties(IEntityType) 方法

定義

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

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

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

參數

entityType
IEntityType

實體類型。

傳回

宣告的非導覽屬性。

適用於