Interface IPropertyBase
- Namespace
- Microsoft.EntityFrameworkCore.Metadata
- Assembly
- Microsoft.EntityFrameworkCore.dll
Base interface for navigations and properties.
public interface IPropertyBase : IReadOnlyPropertyBase, IAnnotatable, IReadOnlyAnnotatable
- Inherited Members
- Extension Methods
Remarks
See Modeling entity types and relationships for more information and examples.
Properties
DeclaringType
Gets the type that this property-like object belongs to.
ITypeBase DeclaringType { get; }
Property Value
Methods
GetCurrentValueComparer()
Gets a IComparer<T> for comparing values in tracked IUpdateEntry entries.
IComparer<IUpdateEntry> GetCurrentValueComparer()
Returns
- IComparer<IUpdateEntry>
The comparer.
GetGetter()
Gets a IClrPropertyGetter for reading the value of this property.
IClrPropertyGetter GetGetter()
Returns
- IClrPropertyGetter
The accessor.
Remarks
Note that it is an error to call this method for a shadow property (IsShadowProperty()) since such a property has no associated MemberInfo.
GetIndex()
Gets the property index for this property.
int GetIndex()
Returns
- int
The index of the property.
GetMemberInfo(bool, bool)
Gets the PropertyInfo or FieldInfo that should be used to get or set a value for the given property.
MemberInfo GetMemberInfo(bool forMaterialization, bool forSet)
Parameters
forMaterialization
boolIf true, then the member to use for query materialization will be returned.
forSet
boolIf 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
- MemberInfo
The MemberInfo to use.
Remarks
Note that it is an error to call this method for a shadow property (IsShadowProperty()) since such a property has no associated MemberInfo.