Ejemplo n.º 1
0
        public ActionResult MovieDetails(int id)
        {
            Dictionary <string, object> model = new Dictionary <string, object>();
            Movie selectedMovie = Movie.Find(id);

            model.Add("movie", selectedMovie);
            Users foundUser = Users.FindId(Int32.Parse(Request.Form["userId"]));

            model.Add("User", foundUser);
            if (Request.Form["inputReview"] != "")
            {
                selectedMovie.AddReviewUser(foundUser, Request.Form["inputReview"]);
            }

            List <Review> ListReview = Review.GetAllReview(id);

            model.Add("Review", ListReview);

            return(View(model));
        }