DbRawSqlQuery<TElement>.MaxAsync 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
MaxAsync() |
Asynchronously returns the maximum value of the query. |
MaxAsync(CancellationToken) |
Asynchronously returns the maximum value of the query. |
MaxAsync()
Asynchronously returns the maximum value of the query.
public System.Threading.Tasks.Task<TElement> MaxAsync ();
member this.MaxAsync : unit -> System.Threading.Tasks.Task<'Element>
Public Function MaxAsync () As Task(Of TElement)
Returns
A task that represents the asynchronous operation. The task result contains the maximum value in the query result.
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
MaxAsync(CancellationToken)
Asynchronously returns the maximum value of the query.
public System.Threading.Tasks.Task<TElement> MaxAsync (System.Threading.CancellationToken cancellationToken);
member this.MaxAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<'Element>
Parameters
- 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 the maximum value in the query result.
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