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) ));; }
public async Task <PagedResultDto <DepartmentDto> > GetListAsync(GetDepartmentsInput input) { return(await DepartmentAppService.GetListAsync(input)); }