public void Update(Student student) { var query = Query<Student>.EQ(x => x.Id, student.Id); var update = Update<Student>.Replace(student); _database.GetCollection<Student>("students").Update(query, update); }
public void Add(Student student) { _database.GetCollection<Student>("students").Save(student); }