Example #1
0
        public ActionResult ViewCollection()
        {
            var ops = new DVDLibraryOperations();
            var movies = ops.GetMovieListShortDetail();

            var collectionVM = new MovieCollectionViewModel(movies);

            return View(collectionVM);
        }
Example #2
0
        public ActionResult ViewCollection(string MovieTitle)
        {
            var ops = new DVDLibraryOperations();
            var movies = ops.GetMovieListShortDetail();

            var filteredMovies = (from m in movies
                where m.Title.ToLower().Contains(MovieTitle.ToLower())
                select m).ToList();

            var collectionVM = new MovieCollectionViewModel(filteredMovies);

            return View(collectionVM);
        }