Share via


PropertyBaseExtensions.GetMemberInfo(IPropertyBase, Boolean, Boolean) Method

Definition

Gets the PropertyInfo or FieldInfo that should be used to get or set a value for the given property.

Note that it is an error to call this method for a shadow property (IsShadowProperty(IPropertyBase)) since such a property has no associated MemberInfo.

public static System.Reflection.MemberInfo GetMemberInfo (this Microsoft.EntityFrameworkCore.Metadata.IPropertyBase propertyBase, bool forMaterialization, bool forSet);
static member GetMemberInfo : Microsoft.EntityFrameworkCore.Metadata.IPropertyBase * bool * bool -> System.Reflection.MemberInfo
<Extension()>
Public Function GetMemberInfo (propertyBase As IPropertyBase, forMaterialization As Boolean, forSet As Boolean) As MemberInfo

Parameters

propertyBase
IPropertyBase

The property.

forMaterialization
Boolean

If true, then the member to use for query materialization will be returned.

forSet
Boolean

If true, then the member to use for setting the property value will be returned, otherwise the member to use for getting the property value will be returned.

Returns

The MemberInfo to use.

Applies to