Method EstimatedDocumentCountAsync

| MongoDB CSharp Driver API Reference (original) (raw)

Namespace

MongoDB.Driver

Assembly

MongoDB.Driver.dll

EstimatedDocumentCountAsync(EstimatedDocumentCountOptions, CancellationToken)

Returns an estimate of the number of documents in the collection.

Task<long> EstimatedDocumentCountAsync(EstimatedDocumentCountOptions options = null, CancellationToken cancellationToken = default)

Parameters

options EstimatedDocumentCountOptions

The options.

cancellationToken CancellationToken

The cancellation token.

Returns

Task<long>

An estimate of the number of documents in the collection.