Back to Devexpress

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

xpo-devexpress-dot-xpo-dot-xpqueryextensions-dot-anyasync-1-x28-system-dot-linq-dot-iqueryable-0-system-dot-threading-dot-cancellationtoken-x29.md

latest2.3 KB
Original Source

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

Asynchronously checks whether any objects exist in a selection.

Namespace : DevExpress.Xpo

Assembly : DevExpress.Xpo.v25.2.dll

NuGet Package : DevExpress.Xpo

Declaration

csharp
public static Task<bool> AnyAsync<T>(
    this IQueryable<T> query,
    CancellationToken cancellationToken = default(CancellationToken)
)
vb
<ExtensionAttribute>
Public Shared Function AnyAsync(Of T)(
    query As IQueryable(Of T),
    cancellationToken As CancellationToken = Nothing
) As Task(Of Boolean)

Parameters

NameTypeDescription
queryIQueryable<T>

An XPQuery<T> that specifies a selection.

|

Optional Parameters

NameTypeDefaultDescription
cancellationTokenCancellationTokennull

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

|

Type Parameters

Name
T

Returns

TypeDescription
Task<Boolean>

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

|

See Also

XPQueryExtensions Class

XPQueryExtensions Members

DevExpress.Xpo Namespace