Skip to main content
.NET 6.0+

XPQueryExtensions.AnyAsync<T>(IQueryable<T>, CancellationToken) Method

Asynchronously checks whether any objects exist in a selection.

Namespace: DevExpress.Xpo

Assembly: DevExpress.Xpo.v23.2.dll

NuGet Package: DevExpress.Xpo

Declaration

public static Task<bool> AnyAsync<T>(
    this IQueryable<T> query,
    CancellationToken cancellationToken = default(CancellationToken)
)

Parameters

Name Type Description
query IQueryable<T>

An XPQuery<T> that specifies a selection.

Optional Parameters

Name Type Default Description
cancellationToken CancellationToken null

A CancellationToken object that delivers a cancellation notice to the running operation.

Type Parameters

Name
T

Returns

Type Description
Task<Boolean>

A Task that returns true if any objects exist in a selection. Otherwise, it returns false.

See Also