Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

QueryableExtensions::LoadAsync Method

Entity Framework 6.0
 

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.

Namespace:   System.Data.Entity
Assembly:  EntityFramework (in EntityFramework.dll)

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticLoadAsync(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.

System_CAPS_pubmethodSystem_CAPS_staticLoadAsync(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.

Return to top

QueryableExtensions::LoadAsync Method (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:
[ExtensionAttribute]
static Task^ LoadAsync(
	IQueryable^ source
)

Parameters

source
Type: System.Linq::IQueryable^

The source query.

Return Value

Type: System.Threading.Tasks::Task^

A task that represents the asynchronous operation.

Return to top

QueryableExtensions::LoadAsync Method (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:
[ExtensionAttribute]
static Task^ LoadAsync(
	IQueryable^ source,
	CancellationToken cancellationToken
)

Parameters

source
Type: System.Linq::IQueryable^

The source query.

cancellationToken
Type: System.Threading::CancellationToken

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

Return Value

Type: System.Threading.Tasks::Task^

A task that represents the asynchronous operation.

Return to top
Show: