Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
        public async Task <IPagedList <EmailAccount> > Get([FromQuery] PaginationSearchViewModel viewModel)
        {
            await AuthorizeReadAsync(EmailAccountFunctionName);

            return(await _emailAccountService.GetPagedListAsync(viewModel.Page, viewModel.Size));
        }