Method FindAs
FindAs<TDocument>(IMongoQuery)
Returns a cursor that can be used to find all documents in this collection that match the query as TDocuments.
public virtual MongoCursor<TDocument> FindAs<TDocument>(IMongoQuery query)
Parameters
query
IMongoQueryThe query (usually a QueryDocument or constructed using the Query builder).
Returns
- MongoCursor<TDocument>
Type Parameters
TDocument
The type to deserialize the documents as.
FindAs(Type, IMongoQuery)
Returns a cursor that can be used to find all documents in this collection that match the query as TDocuments.
public virtual MongoCursor FindAs(Type documentType, IMongoQuery query)
Parameters
documentType
TypeThe nominal type of the documents.
query
IMongoQueryThe query (usually a QueryDocument or constructed using the Query builder).