Class MemberEntry
- Namespace
- Microsoft.EntityFrameworkCore.ChangeTracking
- Assembly
- Microsoft.EntityFrameworkCore.dll
Provides access to change tracking information and operations for a given property or navigation property.
public abstract class MemberEntry : IInfrastructure<InternalEntityEntry>
- Inheritance
-
MemberEntry
- Implements
- Derived
- Inherited Members
- Extension Methods
Remarks
Scalar properties use the derived class PropertyEntry, reference navigation properties use the derived class ReferenceEntry, and collection navigation properties use the derived class CollectionEntry.
Instances of this class are returned from methods when using the ChangeTracker API and it is not designed to be directly constructed in your application code.
See Accessing tracked entities in EF Core for more information and examples.
Constructors
MemberEntry(InternalEntityEntry, IPropertyBase)
This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.
[EntityFrameworkInternal]
protected MemberEntry(InternalEntityEntry internalEntry, IPropertyBase metadata)
Parameters
internalEntry
InternalEntityEntrymetadata
IPropertyBase
Properties
CurrentValue
Gets or sets the value currently assigned to this property. If the current value is set using this property, the change tracker is aware of the change and DetectChanges() is not required for the context to detect the change.
public virtual object? CurrentValue { get; set; }
Property Value
Remarks
See Accessing tracked entities in EF Core for more information and examples.
EntityEntry
The EntityEntry to which this member belongs.
public virtual EntityEntry EntityEntry { get; }
Property Value
- EntityEntry
An entry for the entity that owns this member.
Remarks
See Accessing tracked entities in EF Core for more information and examples.
InternalEntry
This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.
[EntityFrameworkInternal]
protected virtual InternalEntityEntry InternalEntry { get; }
Property Value
IsModified
For non-navigation properties, gets or sets a value indicating whether the value of this property has been modified and should be updated in the database when SaveChanges() is called.
public abstract bool IsModified { get; set; }
Property Value
Remarks
For navigation properties, gets or sets a value indicating whether any of foreign key property values associated with this navigation property have been modified and should be updated in the database when SaveChanges() is called.
See Accessing tracked entities in EF Core for more information and examples.
Metadata
Gets the metadata that describes the facets of this property and how it maps to the database.
public virtual IPropertyBase Metadata { get; }