Esempio n. 1
0
        // GET: Movies
        public ActionResult Index()
        {
            List <MovieVM> moviesVM = new List <MovieVM>();

            using (MoviesReference.MoviesClient service = new MoviesReference.MoviesClient())
            {
                foreach (var item in service.GetMovies())
                {
                    moviesVM.Add(new MovieVM(item));
                }
            }
            return(View(moviesVM));
        }
        // GET: Movies
        public ActionResult Index()
        {
            List <MovieVM> moviesVM = new List <MovieVM>();

            using (MoviesReference.MoviesClient service = new MoviesReference.MoviesClient())
            {
                foreach (var item in service.GetMovies())
                {
                    moviesVM.Add(new MovieVM
                    {
                        Id             = item.Id,
                        Title          = item.Title,
                        ReleaseDate    = item.ReleaseDate,
                        ReleaseCountry = item.ReleaseCountry
                    });
                }
            }
            return(View(moviesVM));
        }