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

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

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