Method FindOneById
FindOneById(BsonValue)
Returns a cursor that can be used to find one document in this collection by its _id value as a TDefaultDocument.
public virtual TDefaultDocument FindOneById(BsonValue id)
Parameters
id
BsonValueThe id of the document.
Returns
- TDefaultDocument
A TDefaultDocument (or null if not found).