示例#1
0
        /// <summary>
        /// MODULE 11: Paging
        /// </summary>
        /// <returns></returns>
        public ActionResult Paging()
        {
            var model = new PagedCountryListViewModel {
                Header = new HeaderViewModel(246)
            };

            return(View(model));
        }
示例#2
0
        public PagedCountryListViewModel GetPagedCountryListViewModel(int pageIndex, int pageSize)
        {
            var all   = _countryRepository.All().ToList();
            var model = new PagedCountryListViewModel
            {
                Header          = new HeaderViewModel(all.Count),
                CountriesInPage = new PagedList <Country>(all, pageIndex, pageSize)
            };

            return(model);
        }