예제 #1
0
        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);
        }
예제 #2
0
        public override async Task <PagedResult <UserDto> > AfterValidation(GetPagedUserQuery request)
        {
            var users = await _userRepository.GetAllPagedAsync(request.Page, request.Size);

            return(_mapper.Map <PagedResult <UserDto> >(users));
        }