예제 #1
0
        public ActionResult ViewSingleReview(int id = 0)
        {
            var model = new ViewReviewModel {
                Reviews = _reviewService.GetById(id)
            };

            return(View(model));
        }
예제 #2
0
 public ActionResult ViewSingleReview(ViewReviewModel model)
 {
     if (ModelState.IsValid)
     {
         var entity = _reviewService.GetById(model.Reviews.Id);
         entity.IsApproved = true;
         _reviewService.Update(entity);
     }
     return(RedirectToAction("ApproveReviews"));
 }