Method CountAsync
| MongoDB CSharp Driver API Reference (original) (raw)
Namespace
Assembly
MongoDB.Driver.dll
CountAsync(CancellationToken)
Counts the number of documents.
[Obsolete("Use CountDocumentsAsync instead.")]
Task<long> CountAsync(CancellationToken cancellationToken = default)
Parameters
cancellationToken
CancellationToken
The cancellation token.
Returns
A Task whose result is the count.