MutableEntityTypeExtensions.FindProperty 方法

定义

获取给定实体类型的属性。 null如果未找到任何属性,则返回 。

此 API 仅查找标量属性,而不查找导航属性。 使用 FindNavigation(IMutableEntityType, MemberInfo) 查找导航属性。

public static Microsoft.EntityFrameworkCore.Metadata.IMutableProperty FindProperty (this Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType entityType, System.Reflection.PropertyInfo propertyInfo);
static member FindProperty : Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType * System.Reflection.PropertyInfo -> Microsoft.EntityFrameworkCore.Metadata.IMutableProperty
<Extension()>
Public Function FindProperty (entityType As IMutableEntityType, propertyInfo As PropertyInfo) As IMutableProperty

参数

entityType
IMutableEntityType

实体类型。

propertyInfo
PropertyInfo

实体类上的 属性。

返回

属性;如果未找到任何属性,则为 。null

适用于