public ActionResult RateInstructor(InstructorRatingCreate model) { if (ModelState.IsValid) { var service = new RatingService(User.Identity.GetUserId()); if (service.CreateInstructorRating(model)) { return(RedirectToAction(nameof(Index))); } } return(View(model)); }