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); }
public WUser Create(WUser p) { _db.GetCollection <WUser>("Users").Save(p); return(p); }