Exemplo n.º 1
0
        public ViewResult Favourites(int?page)
        {
            var favouriteMovies = _userDataProvider.GetFavouritesMoviesByUser(ApplicationUser.Id);

            var pageSize   = 10;
            var pageNumber = (page ?? 1);
            var viewModel  = new FavouritesViewModel()
            {
                FavouritesMovies = favouriteMovies.ToPagedList(pageNumber, pageSize)
            };

            return(View(viewModel));
        }