Microsoft.EntityFrameworkCore.ChangeTracking Namespace

Classes

ArrayStructuralComparer<TElement>

Specifies value comparison for arrays where each element pair is compared. A new array is constructed when snapshotting.

ChangeTracker

Provides access to change tracking information and operations for entity instances the context is tracking. Instances of this class are typically obtained from ChangeTracker and it is not designed to be directly constructed in your application code.

CollectionEntry

Provides access to change tracking and loading information for a collection navigation property that associates this entity to a collection of another entities.

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.

CollectionEntry<TEntity,TRelatedEntity>

Provides access to change tracking and loading information for a collection navigation property that associates this entity to a collection of another entities.

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.

EntityEntry

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

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.

EntityEntry<TEntity>

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

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.

EntityEntryEventArgs

Event arguments for events relating to tracked EntityEntrys.

EntityEntryGraphNode

Provides access to change tracking information and operations for a node in a graph of entities that is being traversed.

EntityEntryGraphNode<TState>

Provides access to change tracking information and operations for a node in a graph of entities that is being traversed.

EntityStateChangedEventArgs

Event arguments for the StateChanged event.

EntityTrackedEventArgs

Event arguments for the Tracked event.

EntryCurrentValueComparer<TProperty>

An implementation of IComparer<T> and IEqualityComparer<T> to compare current values contained in IUpdateEntry internal tracking entities.

This type is typically used by database providers (and other extensions). It is generally not used in application code.

GeometryValueComparer<TGeometry>

Value snapshotting and comparison logic for NetTopologySuite.Geometries.Geometry instances.

LocalView<TEntity>

A collection that stays in sync with entities of a given type being tracked by a DbContext. Call Local to obtain a local view.

This local view will stay in sync as entities are added or removed from the context. Likewise, entities added to or removed from the local view will automatically be added to or removed from the context.

Adding an entity to this collection will cause it to be tracked in the Added state by the context unless it is already being tracked.

Removing an entity from this collection will cause it to be marked as Deleted, unless it was previously in the Added state, in which case it will be detached from the context.

The collection implements INotifyCollectionChanged, INotifyPropertyChanging, and INotifyPropertyChanging such that notifications are generated when an entity starts being tracked by the context or is marked as Deleted or Detached.

Do not use this type directly for data binding. Instead call ToObservableCollection() for WPF binding, or ToBindingList() for WinForms.

MemberEntry

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

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.

NavigationEntry

Provides access to change tracking and loading information for a navigation property that associates this entity to one or more other entities.

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.

ObservableCollectionListSource<T>

Extends ObservableCollection<T> and adds an explicit implementation of IListSource.

The method GetList() is implemented to return an IBindingList implementation that stays in sync with the ObservableCollection.

This class can be used to implement navigation properties on entities for use in Windows Forms data binding. For WPF data binding use an ObservableCollection rather than an instance of this class.

ObservableHashSet<T>

A hash set that implements the interfaces required for Entity Framework to use notification based change tracking for a collection navigation property.

PropertyEntry

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

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.

PropertyEntry<TEntity,TProperty>

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

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.

PropertyValues

A collection of all property values for an entity.

Objects of this type can be obtained from CurrentValues, OriginalValues, GetDatabaseValues(), or GetDatabaseValuesAsync(CancellationToken). Once obtained, the objects are usually used in various combinations to resolve optimistic concurrency exceptions signaled by the throwing of a DbUpdateConcurrencyException.

ReferenceEntry

Provides access to change tracking and loading information for a reference (i.e. non-collection) navigation property that associates this entity to another entity.

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.

ReferenceEntry<TEntity,TProperty>

Provides access to change tracking and loading information for a reference (i.e. non-collection) navigation property that associates this entity to another entity.

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.

ValueComparer

Specifies custom value snapshotting and comparison for CLR types that cannot be compared with Equals(Object, Object) and/or need a deep/structural copy when taking a snapshot. For example, arrays of primitive types will require both if mutation is to be detected.

Snapshotting is the process of creating a copy of the value into a snapshot so it can later be compared to determine if it has changed. For some types, such as collections, this needs to be a deep copy of the collection rather than just a shallow copy of the reference.

ValueComparer<T>

Specifies custom value snapshotting and comparison for CLR types that cannot be compared with Equals(Object, Object) and/or need a deep copy when taking a snapshot. For example, arrays of primitive types will require both if mutation is to be detected.

Snapshotting is the process of creating a copy of the value into a snapshot so it can later be compared to determine if it has changed. For some types, such as collections, this needs to be a deep copy of the collection rather than just a shallow copy of the reference.

ValueComparerExtensions

Extension methods for ValueComparer.

Interfaces

IDependentKeyValueFactory<TKey>

A factory for key values based on the foreign key values taken from various forms of entity data.

This type is typically used by database providers (and other extensions). It is generally not used in application code.

IEntityEntryGraphIterator

A service to traverse a graph of entities and perform some action on at each node.

The service lifetime is Singleton. This means a single instance is used by many DbContext instances. The implementation must be thread-safe. This service cannot depend on services registered as Scoped.

IPrincipalKeyValueFactory<TKey>

Gets a factory for key values based on the primary/principal key values taken from various forms of entity data.

This type is typically used by database providers (and other extensions). It is generally not used in application code.

Enums

CascadeTiming

Defines different strategies for when cascading actions will be performed. See CascadeDeleteTiming and DeleteOrphansTiming.

ChangeTrackerDebugStringOptions

Debug string customization options for tracked entities.