DbRawSqlQuery<TElement>.AnyAsync Method

 

Asynchronously determines whether the query contains any elements.

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

NameDescription
System_CAPS_pubmethodAnyAsync()

Asynchronously determines whether the query contains any elements.

System_CAPS_pubmethodAnyAsync(CancellationToken)

Asynchronously determines whether the query contains any elements.

System_CAPS_pubmethodAnyAsync(Func<TElement, Boolean>)

Asynchronously determines whether any element of the query satisfies a condition.

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

public Task<bool> AnyAsync()

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 (CancellationToken)

Asynchronously determines whether the query contains any elements.

public Task<bool> AnyAsync(
	CancellationToken cancellationToken
)

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.

public Task<bool> AnyAsync(
	Func<TElement, bool> predicate
)

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.