public async Task <ActionResult> ProviderList(int pageIndex = 1, int pageSize = 20) { //总页码、当前页码、可显示总页码 var providerSvc = new ProviderService(); //当前第n页数据 var articles = await providerSvc.GetAllProvider(pageIndex, pageSize, false); //总个数 var dataCount = await providerSvc.GetDataCount(); //绑定分页 var list = new PagedList <ProviderDto>(articles, pageIndex, pageSize, dataCount); return(View(list)); }