Beispiel #1
0
 // Delete a review - Typically I do not completely delete anything from the database but rather set a bit field to false (Review.disposed)
 public void DeleteReview(Review review)
 {
     foreach (Review rev in reviews)
     {
         if (review.reviewID == rev.reviewID)
         {
             review.disposed = true;
         }
     }
 }
Beispiel #2
0
 // Post a review for a restaurant
 public void PostReview(Restaurant restaurant, User user, string reviewText, int rating)
 {
     Review review = new Review(restaurant, user, reviewText, rating, DateTime.Now);
     reviews.Add(review);
 }