DbRawSqlQuery<TElement>.AllAsync 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
AllAsync(Func<TElement,Boolean>) |
Asynchronously determines whether all the elements of the query satisfy a condition. |
AllAsync(Func<TElement,Boolean>, CancellationToken) |
Asynchronously determines whether all the elements of the query satisfy a condition. |
AllAsync(Func<TElement,Boolean>)
Asynchronously determines whether all the elements of the query satisfy a condition.
public System.Threading.Tasks.Task<bool> AllAsync (Func<TElement,bool> predicate);
member this.AllAsync : Func<'Element, bool> -> System.Threading.Tasks.Task<bool>
Public Function AllAsync (predicate As Func(Of TElement, Boolean)) As Task(Of Boolean)
Parameters
Returns
A task that represents the asynchronous operation.
The task result contains true
if every element of the query result passes the test in the specified predicate; otherwise, false
.
Exceptions
predicate
is
null
.
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
AllAsync(Func<TElement,Boolean>, CancellationToken)
Asynchronously determines whether all the elements of the query satisfy a condition.
public System.Threading.Tasks.Task<bool> AllAsync (Func<TElement,bool> predicate, System.Threading.CancellationToken cancellationToken);
member this.AllAsync : Func<'Element, bool> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
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 true
if every element of the query result passes the test in the specified predicate; otherwise, false
.
Exceptions
predicate
is
null
.
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