ObjectQuery.ExecuteAsync Method
Asynchronously allows explicit query evaluation.
Assembly: EntityFramework (in EntityFramework.dll)
Name | Description | |
---|---|---|
![]() | ExecuteAsync(MergeOption) | Asynchronously executes the untyped object query with the specified merge option. |
![]() | ExecuteAsync(MergeOption, CancellationToken) | Asynchronously executes the untyped object query with the specified merge option. |
ObjectQuery.ExecuteAsync Method (MergeOption)
Asynchronously executes the untyped object query with the specified merge option.
Parameters
- mergeOption
-
Type:
System.Data.Entity.Core.Objects.MergeOption
The MergeOption to use when executing the query. The default is AppendOnly.
Return Value
Type: System.Threading.Tasks.Task<ObjectResult>A task that represents the asynchronous operation. The task result contains an an ObjectResult<T> that contains a collection of entity objects returned by the query.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure that any asynchronous operations have completed before calling another method on this context.
ObjectQuery.ExecuteAsync Method (MergeOption, CancellationToken)
Asynchronously executes the untyped object query with the specified merge option.
public Task<ObjectResult> ExecuteAsync(
MergeOption mergeOption,
CancellationToken cancellationToken
)
Parameters
- mergeOption
-
Type:
System.Data.Entity.Core.Objects.MergeOption
The MergeOption to use when executing the query. The default is AppendOnly.
- cancellationToken
-
Type:
System.Threading.CancellationToken
A CancellationToken to observe while waiting for the task to complete.
Return Value
Type: System.Threading.Tasks.Task<ObjectResult>A task that represents the asynchronous operation. The task result contains an an ObjectResult<T> that contains a collection of entity objects returned by the query.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure that any asynchronous operations have completed before calling another method on this context.