Beispiel #1
0
        public async Task <IActionResult> BlogPostDetail(int blogPostId)
        {
            var blogPostDetail = await _blogPostRepository.GetBlogPostDetail(blogPostId);

            var blogPostCommentList = await _blogPostRepository.GetBlogPostCommentList(blogPostDetail.Id);

            var blogPostDetailDto = _mapper.Map <BlogPostDetailDto>(blogPostDetail);

            blogPostDetailDto.BlockPostComments = blogPostCommentList.ToList();

            return(Ok(blogPostDetailDto));
        }