public ListAgencyViewModel GetListAgency(int pageindex, int pagesize) { var agencies = _IAgencyRepository.ListPaging("DateModified_desc", pageindex, pagesize); var total = _IAgencyRepository.CountAll(); return(new ListAgencyViewModel() { Agencies = agencies.Select(a => new AgencyViewModel(a)).ToList(), Pager = new PagerViewModel(pageindex, pagesize, total) }); }