ObjectQuery<T>.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 object query with the specified merge option. |
ExecuteAsync(MergeOption, CancellationToken) |
Asynchronously executes the object query with the specified merge option. |
ExecuteAsync(MergeOption)
Asynchronously executes the object query with the specified merge option.
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
public System.Threading.Tasks.Task<System.Data.Entity.Core.Objects.ObjectResult<T>> ExecuteAsync (System.Data.Entity.Core.Objects.MergeOption mergeOption);
override this.ExecuteAsync : System.Data.Entity.Core.Objects.MergeOption -> System.Threading.Tasks.Task<System.Data.Entity.Core.Objects.ObjectResult<'T>>
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 ObjectResult<T> that contains a collection of entity objects returned by the query.
- Attributes
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 object query with the specified merge option.
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
public System.Threading.Tasks.Task<System.Data.Entity.Core.Objects.ObjectResult<T>> ExecuteAsync (System.Data.Entity.Core.Objects.MergeOption mergeOption, System.Threading.CancellationToken cancellationToken);
override this.ExecuteAsync : System.Data.Entity.Core.Objects.MergeOption * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Data.Entity.Core.Objects.ObjectResult<'T>>
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 ObjectResult<T> that contains a collection of entity objects returned by the query.
- Attributes
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