DbRawSqlQuery<TElement>::AllAsync Method

Entity Framework 6.0
 

Asynchronously determines whether all the elements of the query satisfy a condition.

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

NameDescription
System_CAPS_pubmethodAllAsync(Func<TElement, Boolean>^)

Asynchronously determines whether all the elements of the query satisfy a condition.

System_CAPS_pubmethodAllAsync(Func<TElement, Boolean>^, CancellationToken)

Asynchronously determines whether all the elements of the query satisfy a condition.

Return to top

DbRawSqlQuery<TElement>::AllAsync Method (Func<TElement, Boolean>^)

Asynchronously determines whether all the elements of the query satisfy a condition.

public:
Task<bool>^ AllAsync(
	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 every element of the query result passes the test in the specified predicate; otherwise, false.

Exception Condition
ArgumentNullException

predicate is null .

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.

Return to top

DbRawSqlQuery<TElement>::AllAsync Method (Func<TElement, Boolean>^, CancellationToken)

Asynchronously determines whether all the elements of the query satisfy a condition.

public:
Task<bool>^ AllAsync(
	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 every element of the query result passes the test in the specified predicate; otherwise, false.

Exception Condition
ArgumentNullException

predicate is null .

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.

Return to top
Show: