DbExtensions.AsNoTracking Method

Definition

Overloads

AsNoTracking(IQueryable)

Returns a new query where the entities returned will not be cached in the DbContext or ObjectContext. This method works by calling the AsNoTracking method of the underlying query object. If the underlying query object does not have a AsNoTracking method, then calling this method will have no affect.

AsNoTracking<T>(IQueryable<T>)

Returns a new query where the entities returned will not be cached in the DbContext or ObjectContext. This method works by calling the AsNoTracking method of the underlying query object. If the underlying query object does not have a AsNoTracking method, then calling this method will have no affect.

AsNoTracking(IQueryable)

Returns a new query where the entities returned will not be cached in the DbContext or ObjectContext. This method works by calling the AsNoTracking method of the underlying query object. If the underlying query object does not have a AsNoTracking method, then calling this method will have no affect.

public static System.Linq.IQueryable AsNoTracking (this System.Linq.IQueryable source);
static member AsNoTracking : System.Linq.IQueryable -> System.Linq.IQueryable
<Extension()>
Public Function AsNoTracking (source As IQueryable) As IQueryable

Parameters

source
IQueryable

The source query.

Returns

A new query with NoTracking applied, or the source query if NoTracking is not supported.

Applies to

AsNoTracking<T>(IQueryable<T>)

Returns a new query where the entities returned will not be cached in the DbContext or ObjectContext. This method works by calling the AsNoTracking method of the underlying query object. If the underlying query object does not have a AsNoTracking method, then calling this method will have no affect.

public static System.Linq.IQueryable<T> AsNoTracking<T> (this System.Linq.IQueryable<T> source) where T : class;
static member AsNoTracking : System.Linq.IQueryable<'T (requires 'T : null)> -> System.Linq.IQueryable<'T (requires 'T : null)> (requires 'T : null)
<Extension()>
Public Function AsNoTracking(Of T As Class) (source As IQueryable(Of T)) As IQueryable(Of T)

Type Parameters

T

The element type.

Parameters

source
IQueryable<T>

The source query.

Returns

A new query with NoTracking applied, or the source query if NoTracking is not supported.

Applies to