public async Task <PagedResult <UserDto> > GetPagedUsers(int page, int size) { var query = new GetPagedUserQuery { Page = page, Size = size }; var pagedUsers = await _mediator.SendQuery(query); return(pagedUsers); }
public override async Task <PagedResult <UserDto> > AfterValidation(GetPagedUserQuery request) { var users = await _userRepository.GetAllPagedAsync(request.Page, request.Size); return(_mapper.Map <PagedResult <UserDto> >(users)); }