Table of Contents

Method Any

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

Any<TDocument, TProjection>(IFindFluent<TDocument, TProjection>, CancellationToken)

Determine if there are any results.

public static bool Any<TDocument, TProjection>(this IFindFluent<TDocument, TProjection> find, CancellationToken cancellationToken = default)

Parameters

find IFindFluent<TDocument, TProjection>

The fluent find.

cancellationToken CancellationToken

The cancellation token.

Returns

bool

True if there is at least one document.

Type Parameters

TDocument

The type of the document.

TProjection

The type of the projection (same as TDocument if there is no projection).