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