コード例 #1
0
        public virtual async Task <PagedResultDto <DepartmentDto> > GetListAsync(GetDepartmentsInput input)
        {
            if (input.Sorting.IsNullOrWhiteSpace())
            {
                input.Sorting = nameof(Department.Name);
            }

            var count = await DepartmentRepository.GetCountAsync();

            var departments = await DepartmentRepository.GetPagedListAsync(
                input.SkipCount,
                input.MaxResultCount,
                input.Sorting
                );

            return(new PagedResultDto <DepartmentDto>(
                       count,
                       ObjectMapper.Map <List <Department>, List <DepartmentDto> >(departments)
                       ));;
        }
コード例 #2
0
 public async Task <PagedResultDto <DepartmentDto> > GetListAsync(GetDepartmentsInput input)
 {
     return(await DepartmentAppService.GetListAsync(input));
 }