public HttpResponseMessage Post(Review review)
 {
     if (ModelState.IsValid)
     {
         if (review.Id == 0)
         {
             _db.Reviews.Add(review);
             _db.SaveChanges();
             return Request.CreateResponse(HttpStatusCode.Created, review);
         }
         else
         {
             var original = _db.Reviews.Find(review.Id);
             original.Image = review.Image;
             original.ProductName = review.ProductName;
             original.ProductReview = review.ProductReview;
             _db.SaveChanges();
             return Request.CreateResponse(HttpStatusCode.OK, review);
         }
     }
     return Request.CreateErrorResponse(HttpStatusCode.BadRequest, this.ModelState);
 }
 public void EditReview(Review review)
 {
     var original = this.FindReview(review.Id);
     original.ProductName = review.ProductName;
 }
 public void CreateReview(Review review)
 {
     _repo.Add<Review>(review);
     _repo.SaveChanges();
 }