public virtual async Task <PagedResultDto <CommentWithAuthorDto> > GetListAsync(CommentGetListInput input) { var totalCount = await CommentRepository.GetCountAsync( input.Text, input.EntityType, input.RepliedCommentId, input.Author, input.CreationStartDate, input.CreationEndDate); var comments = await CommentRepository.GetListAsync( input.Text, input.EntityType, input.RepliedCommentId, input.Author, input.CreationStartDate, input.CreationEndDate, input.Sorting, input.MaxResultCount, input.SkipCount ); var dtos = comments.Select(queryResultItem => { var dto = ObjectMapper.Map <Comment, CommentWithAuthorDto>(queryResultItem.Comment); dto.Author = ObjectMapper.Map <CmsUser, CmsUserDto>(queryResultItem.Author); return(dto); }).ToList(); return(new PagedResultDto <CommentWithAuthorDto>(totalCount, dtos)); }
public virtual async Task <PagedResultDto <CommentWithAuthorDto> > GetListAsync(CommentGetListInput input) { return(await RequestAsync <PagedResultDto <CommentWithAuthorDto> >(nameof(GetListAsync), new ClientProxyRequestTypeValue { { typeof(CommentGetListInput), input } })); }
public virtual Task <PagedResultDto <CommentWithAuthorDto> > GetListAsync(CommentGetListInput input) { return(CommentAdminAppService.GetListAsync(input)); }