ObjectQuery<T>.ExecuteAsync Method
Assembly: EntityFramework (in EntityFramework.dll)
Name | Description | |
---|---|---|
![]() | ExecuteAsync(MergeOption) | Asynchronously executes the object query with the specified merge option. |
![]() | ExecuteAsync(MergeOption, CancellationToken) | Asynchronously executes the object query with the specified merge option. |
ObjectQuery<T>.ExecuteAsync Method (MergeOption)
Asynchronously executes the object query with the specified merge option.
[SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] public Task<ObjectResult<T>> ExecuteAsync( MergeOption mergeOption )
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<T>>A task that represents the asynchronous operation. The task result contains 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<T>.ExecuteAsync Method (MergeOption, CancellationToken)
Asynchronously executes the object query with the specified merge option.
[SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] public Task<ObjectResult<T>> 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<T>>A task that represents the asynchronous operation. The task result contains 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.