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

适用于