ChangeTracker.Entries Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Entries() |
Returns an EntityEntry for each entity being tracked by the context. The entries provide access to change tracking information and operations for each entity. |
| Entries<TEntity>() |
Gets an EntityEntry for all entities of a given type being tracked by the context. The entries provide access to change tracking information and operations for each entity. |
Entries()
Returns an EntityEntry for each entity being tracked by the context. The entries provide access to change tracking information and operations for each entity.
public virtual System.Collections.Generic.IEnumerable<Microsoft.EntityFrameworkCore.ChangeTracking.EntityEntry> Entries ();
abstract member Entries : unit -> seq<Microsoft.EntityFrameworkCore.ChangeTracking.EntityEntry>
override this.Entries : unit -> seq<Microsoft.EntityFrameworkCore.ChangeTracking.EntityEntry>
Public Overridable Function Entries () As IEnumerable(Of EntityEntry)
Returns
An entry for each entity being tracked.
Remarks
This method calls DetectChanges() to ensure all entries returned reflect up-to-date state. Use AutoDetectChangesEnabled to prevent DetectChanges from being called automatically.
Note that modification of entity state while iterating over the returned enumeration may result in an InvalidOperationException indicating that the collection was modified while enumerating. To avoid this, create a defensive copy using ToList<TSource>(IEnumerable<TSource>) or similar before iterating.
Applies to
Entries<TEntity>()
Gets an EntityEntry for all entities of a given type being tracked by the context. The entries provide access to change tracking information and operations for each entity.
public virtual System.Collections.Generic.IEnumerable<Microsoft.EntityFrameworkCore.ChangeTracking.EntityEntry<TEntity>> Entries<TEntity> () where TEntity : class;
abstract member Entries : unit -> seq<Microsoft.EntityFrameworkCore.ChangeTracking.EntityEntry<'Entity>> (requires 'Entity : null)
override this.Entries : unit -> seq<Microsoft.EntityFrameworkCore.ChangeTracking.EntityEntry<'Entity>> (requires 'Entity : null)
Public Overridable Function Entries(Of TEntity As Class) () As IEnumerable(Of EntityEntry(Of TEntity))
Type Parameters
- TEntity
The type of entities to get entries for.
Returns
An entry for each entity of the given type that is being tracked.
Applies to
Feedback
Submit and view feedback for