예제 #1
0
        public async Task <PagedResultDto <UserMessageDto> > GetListAsync(UserMessageListInput input)
        {
            var totalCount = await _repository.GetCountAsync(CurrentUser.GetId(), input.IsReaded, input.Filter);

            var list = await _repository.GetListAsync(input.MaxResultCount, input.SkipCount,
                                                      input.Sorting, CurrentUser.GetId(), input.IsReaded, input.Filter);

            return(new PagedResultDto <UserMessageDto>(
                       totalCount,
                       ObjectMapper.Map <List <UserMessage>, List <UserMessageDto> >(list)
                       ));
        }