Esempio n. 1
0
        public virtual async Task <PagedResultDto <DocumentTypeDto> > GetListAsync(GetDocumentTypesInput input)
        {
            if (input.Sorting.IsNullOrWhiteSpace())
            {
                input.Sorting = nameof(DocumentType.Name);
            }

            var count = await DocumentTypeRepository.GetCountAsync();

            var documentTypes = await DocumentTypeRepository.GetPagedListAsync(
                input.SkipCount,
                input.MaxResultCount,
                input.Sorting
                );

            return(new PagedResultDto <DocumentTypeDto>(
                       count,
                       ObjectMapper.Map <List <DocumentType>, List <DocumentTypeDto> >(documentTypes)
                       ));
        }
 public async Task <PagedResultDto <DocumentTypeDto> > GetListAsync(GetDocumentTypesInput input)
 {
     return(await DocumentTypeAppService.GetListAsync(input));
 }