public void Update(Article article) { var query = Builders<Article>.Filter.Eq(e => e.Id, article.Id); var update = _database.GetCollection<Article>("articles").ReplaceOneAsync(query, article); }
public void Add(Article article) { _database.GetCollection<Article>("articles").InsertOneAsync(article); }