Пример #1
0
        public IDataResult <List <CommentListDto> > GetByPostId(string postId)//+++
        {
            // var entity= _commentDal.GetList();

            /*var result = entity.Select(se=>new CommetListDto {
             * Content=se.Content
             * }).ToList();*/
            // return new SuccessDataResult<List<CommetListDto>>(result);
            // return new SuccessDataResult<List<Comment>>(_commentDal.GetList().ToList());
            return(new SuccessDataResult <List <CommentListDto> >(_commentDal.GetByPostId(p => p.PostId == postId).ToList()));
        }