Click or drag to resize
IMongoCollection<TDocument>.FindAsync<TProjection> Method
Finds the documents matching the filter.

Namespace: MongoDB.Driver
Assembly: MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.4.1
Syntax
Task<IAsyncCursor<TProjection>> FindAsync<TProjection>(
	FilterDefinition<TDocument> filter,
	FindOptions<TDocument, TProjection> options = null,
	CancellationToken cancellationToken = null
)

Parameters

filter
Type: MongoDB.Driver.FilterDefinition<TDocument>
The filter.
options (Optional)
Type: MongoDB.Driver.FindOptions<TDocument, TProjection>
The options.
cancellationToken (Optional)
Type: System.Threading.CancellationToken
The cancellation token.

Type Parameters

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

Return Value

Type: Task<IAsyncCursor<TProjection>>
A Task whose result is a cursor.
See Also