BistroDriveWebApp.Controllers.ProfileController.AddDishFeedback C# (CSharp) Method

AddDishFeedback() private method

private AddDishFeedback ( DishReviewViewModel model ) : System.Web.Mvc.ActionResult
model BistroDriveWebApp.Models.DishReviewViewModel
return System.Web.Mvc.ActionResult
        public ActionResult AddDishFeedback(DishReviewViewModel model)
        {
            string user = User.Identity.GetUserId();
            dish d = DataManager.Dish.GetDishById(model.ID_Dish);
            if (d == null || user == d.Id_User)
            {
                return RedirectToAction("index", "profile");
            }

            if (!ModelState.IsValid)
            {
                return View(model);
            }
            DataManager.Dish.AddDishReview(user, model.ID_Dish, model.Mark, model.Review);
            return RedirectToAction("dishinfo", "profile", new { id = model.ID_Dish });
        }

Same methods

ProfileController::AddDishFeedback ( int id ) : System.Web.Mvc.ActionResult