getRestroomWithRating() public method

public getRestroomWithRating ( int restroomId ) : RestroomWithRatingModel
restroomId int
return RestroomWithRatingModel
Exemplo n.º 1
0
        public ActionResult Show(int id)
        {
            var model = new RestroomModel();
            var viewModel = model.getRestroomWithRating(id);

            return View(viewModel);
        }
Exemplo n.º 2
0
        public ActionResult NewRating(RatingModel ratingModel)
        {
            string val1 = System.Web.HttpContext.Current.User.Identity.Name;
            int userId = Int32.Parse(val1);
            ratingModel.UserId = userId;
            ratingModel.add();

            var model = new RestroomModel();
            var viewModel = model.getRestroomWithRating(ratingModel.RestroomId);


            return RedirectToAction("Show", "Restroom", new { id = viewModel.restroomModel.id });
        }