Method FindOne
FindOne()
Returns one document in this collection as a TDefaultDocument.
public virtual TDefaultDocument FindOne()
Returns
- TDefaultDocument
A TDefaultDocument (or null if not found).
FindOne(IMongoQuery)
Returns one document in this collection that matches a query as a TDefaultDocument.
public virtual TDefaultDocument FindOne(IMongoQuery query)
Parameters
query
IMongoQueryThe query (usually a QueryDocument or constructed using the Query builder).
Returns
- TDefaultDocument
A TDefaultDocument (or null if not found).