Method GetDocumentId
- Namespace
- MongoDB.Bson.Serialization.Serializers
- Assembly
- MongoDB.Bson.dll
GetDocumentId(object, out object, out Type, out IIdGenerator)
Gets the document Id.
public bool GetDocumentId(object document, out object id, out Type idNominalType, out IIdGenerator idGenerator)Parameters
- documentobject
- The document. 
- idobject
- The Id. 
- idNominalTypeType
- The nominal type of the Id. 
- idGeneratorIIdGenerator
- The IdGenerator for the Id type. 
Returns
- bool
- True if the document has an Id.