EntityTypeExtensions.FindProperty 方法

定义

重载

FindProperty(IEntityType, MemberInfo)

获取具有给定成员信息的属性。 null如果未找到任何属性,则返回 。

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

FindProperty(IEntityType, PropertyInfo)

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

此 API 仅查找标量属性,不查找导航属性。 使用 FindNavigation(IEntityType, PropertyInfo) 查找导航属性。

FindProperty(IEntityType, MemberInfo)

获取具有给定成员信息的属性。 null如果未找到任何属性,则返回 。

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

public static Microsoft.EntityFrameworkCore.Metadata.IProperty FindProperty (this Microsoft.EntityFrameworkCore.Metadata.IEntityType entityType, System.Reflection.MemberInfo memberInfo);
static member FindProperty : Microsoft.EntityFrameworkCore.Metadata.IEntityType * System.Reflection.MemberInfo -> Microsoft.EntityFrameworkCore.Metadata.IProperty
<Extension()>
Public Function FindProperty (entityType As IEntityType, memberInfo As MemberInfo) As IProperty

参数

entityType
IEntityType

实体类型。

memberInfo
MemberInfo

实体类上的成员。

返回

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

适用于

FindProperty(IEntityType, PropertyInfo)

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

此 API 仅查找标量属性,不查找导航属性。 使用 FindNavigation(IEntityType, PropertyInfo) 查找导航属性。

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

参数

entityType
IEntityType

要查找属性的实体类型。

propertyInfo
PropertyInfo

实体类上的 属性。

返回

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

适用于