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
queryIMongoQueryThe query (usually a QueryDocument or constructed using the Query builder).
Returns
- MongoCursor<TDocument>
Type Parameters
TDocumentThe 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
documentTypeTypeThe nominal type of the documents.
queryIMongoQueryThe query (usually a QueryDocument or constructed using the Query builder).