public void Update(ObjectId id, CongTySoHuu p) { p.Id = id; var res = Query <CongTySoHuu> .EQ(pd => pd.Id, id); var operation = Update <CongTySoHuu> .Replace(p); _db.GetCollection <CongTySoHuu>("ctysxes").Update(res, operation); }
public CongTySoHuu Create(CongTySoHuu p) { _db.GetCollection <CongTySoHuu>("ctysxes").Save(p); return(p); }