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