예제 #1
0
        public async Task <ActionResult <BlogPostDTO> > CreateBlogPost(BlogPostDTO blogPostDTO)
        {
            int newBlogPostId = await _blogPostRepository.CreateBlogPost(blogPostDTO);

            var newBlogPost = await _blogPostRepository.GetBlogPostByIdAsync(newBlogPostId);

            return(_mapper.Map <BlogPostDTO>(newBlogPost));
        }