public async Task <IPagedList <DappViewModel> > ListAsync(DappSearchModel searchModel) { var data = await _unitOfWork.DappRepository.ListAsync(searchModel.SearchString, searchModel.PageNumber, searchModel.PageSize); var items = await data.ToListAsync(); var model = _mapper.Map <IEnumerable <DappViewModel> >(items); var view = new StaticPagedList <DappViewModel>(model, data.PageNumber, data.PageSize, data.TotalItemCount); return(view); }
// GET: Dapps public async Task <IActionResult> Index(DappSearchModel searchModel) { var model = await _dappService.ListAsync(searchModel); return(View(model)); }