예제 #1
0
 public async Task Update(string id, Project project)
 {
     var filter = Builders<Project>.Filter.Eq("_id", ObjectId.Parse(id));
     await GetCollection().ReplaceOneAsync(filter, project);
 }
예제 #2
0
 public async Task<Project> Add(Project project)
 {
     await GetCollection().InsertOneAsync(project);
     return project;
 }