ObjectQuery.ExecuteAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
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. |
ExecuteAsync(MergeOption)
Asynchronously executes the untyped object query with the specified merge option.
public System.Threading.Tasks.Task<System.Data.Entity.Core.Objects.ObjectResult> ExecuteAsync (System.Data.Entity.Core.Objects.MergeOption mergeOption);
member this.ExecuteAsync : System.Data.Entity.Core.Objects.MergeOption -> System.Threading.Tasks.Task<System.Data.Entity.Core.Objects.ObjectResult>
Parameters
- mergeOption
- MergeOption
The MergeOption to use when executing the query. The default is AppendOnly.
Returns
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.
Remarks
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.
Applies to
ExecuteAsync(MergeOption, CancellationToken)
Asynchronously executes the untyped object query with the specified merge option.
public System.Threading.Tasks.Task<System.Data.Entity.Core.Objects.ObjectResult> ExecuteAsync (System.Data.Entity.Core.Objects.MergeOption mergeOption, System.Threading.CancellationToken cancellationToken);
member this.ExecuteAsync : System.Data.Entity.Core.Objects.MergeOption * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Data.Entity.Core.Objects.ObjectResult>
Parameters
- mergeOption
- MergeOption
The MergeOption to use when executing the query. The default is AppendOnly.
- cancellationToken
- CancellationToken
A CancellationToken to observe while waiting for the task to complete.
Returns
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.
Remarks
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.
Applies to
Entity Framework