public void SetDocumentId(object document, object id) { var bsonSerializable = (IBsonSerializable)document; bsonSerializable.SetDocumentId(id); } }