public async Task <IActionResult> Search(DataTablesRequest viewModel) { viewModel.ParseFormData(Request.Form); var pagedList = await _emailAccountService.GetPagedListAsync( viewModel.SortColumnName, viewModel.SortDirection); return(viewModel.CreateResponse( pagedList.TotalRecords, pagedList.TotalRecordsFiltered, pagedList)); }
public async Task <IPagedList <EmailAccount> > Get([FromQuery] PaginationSearchViewModel viewModel) { await AuthorizeReadAsync(EmailAccountFunctionName); return(await _emailAccountService.GetPagedListAsync(viewModel.Page, viewModel.Size)); }