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