Ejemplo n.º 1
0
        public async Task <PagedResultDto <UserDepartmentDto> > GetListAsync(GetUserDepartmentsInput input)
        {
            if (input.Sorting.IsNullOrWhiteSpace())
            {
                input.Sorting = nameof(UserDepartment.UserName);
            }

            var count = await UserDepartmentRepository.GetCountAsync();

            var modules = await UserDepartmentRepository.GetPagedListAsync(
                input.SkipCount,
                input.MaxResultCount,
                input.Sorting
                );

            return(new PagedResultDto <UserDepartmentDto>(
                       count,
                       ObjectMapper.Map <List <UserDepartment>, List <UserDepartmentDto> >(modules)
                       ));
        }
Ejemplo n.º 2
0
 public async Task <PagedResultDto <UserDepartmentDto> > GetListAsync(GetUserDepartmentsInput input)
 {
     return(await UserDepartmentAppService.GetListAsync(input));
 }