コード例 #1
0
 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);
 }
コード例 #2
0
 public void Add(Article article)
 {
     _database.GetCollection<Article>("articles").InsertOneAsync(article);
 }