Table of Contents

Class PropertyEntry

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

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

public class PropertyEntry : MemberEntry, IInfrastructure<InternalEntityEntry>
Inheritance
PropertyEntry
Implements
Derived
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

IsModified

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 override bool IsModified { get; set; }

Property Value

bool

Remarks

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

IsTemporary

Gets or sets a value indicating whether the value of this property is considered a temporary value which will be replaced by a value generated from the store when SaveChanges()is called.

public virtual bool IsTemporary { get; set; }

Property Value

bool

Remarks

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 IProperty Metadata { get; }

Property Value

IProperty

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 object? OriginalValue { get; set; }

Property Value

object

Remarks

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