DbRawSqlQuery<TElement>.ContainsAsync Method

 

Asynchronously determines whether the query contains a specified element by using the default equality comparer.

Namespace:   System.Data.Entity.Infrastructure
Assembly:  EntityFramework (in EntityFramework.dll)

NameDescription
System_CAPS_pubmethodContainsAsync(TElement)

Asynchronously determines whether the query contains a specified element by using the default equality comparer.

System_CAPS_pubmethodContainsAsync(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.

public Task<bool> ContainsAsync(
	TElement value
)

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.

public Task<bool> ContainsAsync(
	TElement value,
	CancellationToken cancellationToken
)

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.