Method EstimatedDocumentCount

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

Namespace

MongoDB.Driver

Assembly

MongoDB.Driver.dll

EstimatedDocumentCount(EstimatedDocumentCountOptions, CancellationToken)

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

long EstimatedDocumentCount(EstimatedDocumentCountOptions options = null, CancellationToken cancellationToken = default)

Parameters

options EstimatedDocumentCountOptions

The options.

cancellationToken CancellationToken

The cancellation token.

Returns

long

An estimate of the number of documents in the collection.