Table of Contents

Class PropertyEntry<TEntity, TProperty>

Namespace
Microsoft.EntityFrameworkCore.ChangeTracking
Assembly
Microsoft.EntityFrameworkCore.dll

Provides access to change tracking information and operations for a given property.

public class PropertyEntry<TEntity, TProperty> : PropertyEntry, IInfrastructure<InternalEntityEntry> where TEntity : class

Type Parameters

TEntity

The type of the entity the property belongs to.

TProperty

The type of the property.

Inheritance
PropertyEntry<TEntity, TProperty>
Implements
Inherited Members
Extension Methods

Remarks

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

PropertyEntry(InternalEntityEntry, IProperty)

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]
public PropertyEntry(InternalEntityEntry internalEntry, IProperty property)

Parameters

internalEntry InternalEntityEntry
property IProperty

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 TProperty CurrentValue { get; set; }

Property Value

TProperty

Remarks

See Accessing tracked entities in EF Core for more information and examples.

EntityEntry

The EntityEntry<TEntity> to which this member belongs.

public virtual EntityEntry<TEntity> EntityEntry { get; }

Property Value

EntityEntry<TEntity>

An entry for the entity that owns this member.

Remarks

See Accessing tracked entities in EF Core for more information and examples.

OriginalValue

Gets or sets the value that was assigned to this property when it was retrieved from the database. This property is populated when an entity is retrieved from the database, but setting it may be useful in disconnected scenarios where entities are retrieved with one context instance and saved with a different context instance.

public virtual TProperty OriginalValue { get; set; }

Property Value

TProperty

Remarks

See Accessing tracked entities in EF Core for more information and examples.