LocalView<TEntity>.FindEntryUntyped(IEnumerable<Object>) Method

Definition

Finds an EntityEntry<TEntity> for the entity with the given primary key values in the change tracker, if it is being tracked. null is returned if no entity with the given key values is being tracked. This method never queries the database.

public virtual Microsoft.EntityFrameworkCore.ChangeTracking.EntityEntry<TEntity>? FindEntryUntyped (System.Collections.Generic.IEnumerable<object?> keyValues);
abstract member FindEntryUntyped : seq<obj> -> Microsoft.EntityFrameworkCore.ChangeTracking.EntityEntry<'Entity (requires 'Entity : null)>
override this.FindEntryUntyped : seq<obj> -> Microsoft.EntityFrameworkCore.ChangeTracking.EntityEntry<'Entity (requires 'Entity : null)>
Public Overridable Function FindEntryUntyped (keyValues As IEnumerable(Of Object)) As EntityEntry(Of TEntity)

Parameters

keyValues
IEnumerable<Object>

The values of the primary key for the entity to be found.

Returns

An entry for the entity found, or null.

Remarks

By default, accessing Local will call DetectChanges() to ensure that all entities searched and returned are up-to-date. Calling this method will not result in another call to DetectChanges(). Since this method is commonly used for fast lookups, consider reusing the Local object for multiple lookups and/or disabling automatic detecting of changes using AutoDetectChangesEnabled.

See EF Core change tracking for more information and examples.

Applies to