public bool GetDocumentId(object document, out object id, out Type idNominalType, out IIdGenerator idGenerator) { MongoDynamic x = (MongoDynamic)document; id = x._id; idNominalType = typeof(ObjectId); idGenerator = new ObjectIdGenerator(); return true; }