Share via


QueryableExtensions.LoadAsync Method

Definition

Overloads

LoadAsync(IQueryable)

Asynchronously enumerates the query such that for server queries such as those of DbSet<TEntity>, ObjectSet<TEntity> , ObjectQuery<T>, and others the results of the query will be loaded into the associated DbContext , ObjectContext or other cache on the client. This is equivalent to calling ToList and then throwing away the list without the overhead of actually creating the list.

LoadAsync(IQueryable, CancellationToken)

Asynchronously enumerates the query such that for server queries such as those of DbSet<TEntity>, ObjectSet<TEntity> , ObjectQuery<T>, and others the results of the query will be loaded into the associated DbContext , ObjectContext or other cache on the client. This is equivalent to calling ToList and then throwing away the list without the overhead of actually creating the list.

LoadAsync(IQueryable)

Asynchronously enumerates the query such that for server queries such as those of DbSet<TEntity>, ObjectSet<TEntity> , ObjectQuery<T>, and others the results of the query will be loaded into the associated DbContext , ObjectContext or other cache on the client. This is equivalent to calling ToList and then throwing away the list without the overhead of actually creating the list.

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

Parameters

source
IQueryable

The source query.

Returns

A task that represents the asynchronous operation.

Applies to

LoadAsync(IQueryable, CancellationToken)

Asynchronously enumerates the query such that for server queries such as those of DbSet<TEntity>, ObjectSet<TEntity> , ObjectQuery<T>, and others the results of the query will be loaded into the associated DbContext , ObjectContext or other cache on the client. This is equivalent to calling ToList and then throwing away the list without the overhead of actually creating the list.

public static System.Threading.Tasks.Task LoadAsync (this System.Linq.IQueryable source, System.Threading.CancellationToken cancellationToken);
static member LoadAsync : System.Linq.IQueryable * System.Threading.CancellationToken -> System.Threading.Tasks.Task

Parameters

source
IQueryable

The source query.

cancellationToken
CancellationToken

A CancellationToken to observe while waiting for the task to complete.

Returns

A task that represents the asynchronous operation.

Applies to