Пример #1
0
        //
        // GET: /Movie/Details/5
        public ActionResult Details(int id)
        {
            MovieService movieService = new MovieService();
            MovieSet moviesSet = movieService.Details(id);
            Movie movie = Converter.MovieSet2MovieModel(moviesSet);

            return View(movie);
        }
Пример #2
0
        public virtual ActionResult List()
        {
            MovieService movieService = new MovieService();
            List<MovieSet> moviesSetList = movieService.Get();
            List<Movie> moviesModelList = new List<Movie>();

            foreach (MovieSet movieSet in moviesSetList)
            {
                Movie movie = Converter.MovieSet2MovieModel(movieSet);
                moviesModelList.Add(movie);
            }

            return View(moviesModelList);
        }