Esempio n. 1
0
        public WriteConcernResult UpdateField(string collectionName, Guid itemId, string field, string value)
        {
            var query      = MongoUtilsDAO.GetQueryById(itemId);
            var collection = GetCollection(collectionName);

            return(collection.Update(query, Update.Set(field, value)));
        }
Esempio n. 2
0
        public BsonDocument GetCollectionItem(string collectionName, Guid itemId)
        {
            var query = MongoUtilsDAO.GetQueryById(itemId);

            return(GetCollection(collectionName).FindOne(query));
        }