public async Task <bool> RemoveBeer(ObjectId id) { bool bResp = await Collection.RemoveAsync(id); if (bResp) { List <Review> reviews = await ReviewCollection.GetListAsync(r => r.BeerId == id.ToString()); foreach (Review review in reviews) { _ = ReviewCollection.RemoveAsync(review.Id); } } return(bResp); }
public async Task <List <Review> > GetReviews(string beerId) { return(await Collection.GetListAsync(r => r.BeerId == beerId)); }