Example #1
0
        public void Update(ObjectId id, BietDuocHoaChat p)
        {
            p.Id = id;
            var res = Query <BietDuocHoaChat> .EQ(pd => pd.Id, id);

            var operation = Update <BietDuocHoaChat> .Replace(p);

            _db.GetCollection <BietDuocHoaChat>("bietduochoatchats").Update(res, operation);
        }
Example #2
0
 public BietDuocHoaChat Create(BietDuocHoaChat p)
 {
     _db.GetCollection <BietDuocHoaChat>("bietduochoatchats").Save(p);
     return(p);
 }