共用方式為


EntityTypeExtensions.GetProperty(IEntityType, String) 方法

定義

取得具有指定名稱的屬性。

此 API 只會尋找純量屬性,而且找不到導覽屬性。 用來 FindNavigation(IEntityType, String) 尋找導覽屬性。

public static Microsoft.EntityFrameworkCore.Metadata.IProperty GetProperty (this Microsoft.EntityFrameworkCore.Metadata.IEntityType entityType, string name);
static member GetProperty : Microsoft.EntityFrameworkCore.Metadata.IEntityType * string -> Microsoft.EntityFrameworkCore.Metadata.IProperty
<Extension()>
Public Function GetProperty (entityType As IEntityType, name As String) As IProperty

參數

entityType
IEntityType

實體類型。

name
String

屬性名稱。

傳回

如果找不到屬性,則為 null

適用於