public async Task <PagedResult <Document> > RetrievePersonnelDocuments(int personnelId, Paging paging = null, List <OrderBy> orderBy = null) { var documents = await _dataService.RetrievePagedResultAsync <DocumentDetail>(d => d.PersonnelId == personnelId.ToString(), orderBy, paging); var searchResults = _mapper.Map <IEnumerable <Document> >(documents.Items); return(PagedResult <Document> .Create(searchResults, documents.CurrentPage, documents.ResultsPerPage, documents.TotalPages, documents.TotalResults)); }
public async Task <PagedResult <Personnel> > RetrievePersonnels(List <OrderBy> orderBy = null, Paging paging = null) { var personnel = await _dataService.RetrievePagedResultAsync <Personnel>(e => true, orderBy, paging); return(personnel); }