DbRawSqlQuery<TElement>.ContainsAsync Method
Asynchronously determines whether the query contains a specified element by using the default equality comparer.
Assembly: EntityFramework (in EntityFramework.dll)
Name | Description | |
---|---|---|
![]() | ContainsAsync(TElement) | Asynchronously determines whether the query contains a specified element by using the default equality comparer. |
![]() | ContainsAsync(TElement, CancellationToken) | Asynchronously determines whether the query contains a specified element by using the default equality comparer. |
DbRawSqlQuery<TElement>.ContainsAsync Method (TElement)
Asynchronously determines whether the query contains a specified element by using the default equality comparer.
Parameters
- value
-
Type:
TElement
The object to locate in the query result.
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 the specified value; 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>.ContainsAsync Method (TElement, CancellationToken)
Asynchronously determines whether the query contains a specified element by using the default equality comparer.
Parameters
- value
-
Type:
TElement
The object to locate in the query result.
- 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 the specified value; 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.