DbRawSqlQuery<TElement>.AnyAsync Method
Asynchronously determines whether the query contains any elements.
Assembly: EntityFramework (in EntityFramework.dll)
Name | Description | |
---|---|---|
![]() | AnyAsync() | Asynchronously determines whether the query contains any elements. |
![]() | AnyAsync(CancellationToken) | Asynchronously determines whether the query contains any elements. |
![]() | AnyAsync(Func<TElement, Boolean>) | Asynchronously determines whether any element of the query satisfies a condition. |
![]() | AnyAsync(Func<TElement, Boolean>, CancellationToken) | Asynchronously determines whether any element of the query satisfies a condition. |
DbRawSqlQuery<TElement>.AnyAsync Method ()
Asynchronously determines whether the query contains any elements.
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.
DbRawSqlQuery<TElement>.AnyAsync Method (CancellationToken)
Asynchronously determines whether the query contains any elements.
Parameters
- cancellationToken
-
Type:
System.Threading.CancellationToken
A CancellationToken to observe while waiting for the task to complete.
Return Value
Type: System.Threading.Tasks.Task<Boolean>A task that represents the asynchronous operation. The task result contains true if the query result contains any elements; otherwise, false.
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.
DbRawSqlQuery<TElement>.AnyAsync Method (Func<TElement, Boolean>)
Asynchronously determines whether any element of the query satisfies a condition.
Parameters
- predicate
-
Type:
System.Func<TElement, Boolean>
A function to test each element for a condition.
Return Value
Type: System.Threading.Tasks.Task<Boolean>A task that represents the asynchronous operation. The task result contains true if any elements in the query result pass the test in the specified predicate; otherwise, false.
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.
DbRawSqlQuery<TElement>.AnyAsync Method (Func<TElement, Boolean>, CancellationToken)
Asynchronously determines whether any element of the query satisfies a condition.
public Task<bool> AnyAsync( Func<TElement, bool> predicate, CancellationToken cancellationToken )
Parameters
- predicate
-
Type:
System.Func<TElement, Boolean>
A function to test each element for a condition.
- cancellationToken
-
Type:
System.Threading.CancellationToken
A CancellationToken to observe while waiting for the task to complete.
Return Value
Type: System.Threading.Tasks.Task<Boolean>A task that represents the asynchronous operation. The task result contains true if any elements in the query result pass the test in the specified predicate; otherwise, false.
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.