Esempio n. 1
0
        public void UpdateCounter(Model.UserCounter model)
        {
            var filter = Builders <Model.UserCounter> .Filter.Eq(a => a.Id, model.Id);

            var modelUpdated = Builders <Model.UserCounter> .Update.Set(a => a.Counter, model.Counter + 1);

            _colletion.UpdateOne(filter, modelUpdated);
        }
Esempio n. 2
0
 public void Save(Model.UserCounter model)
 {
     _colletion.InsertOne(model);
 }