public async Task <PostViewModel> GetPost(int postId)
        {
            var post = await GetPostById(postId);

            var postOptions = await _postOptionsRepository.GetAllOptionsByPostId(postId);

            var postViewModel = _mapper.Map <Post, PostViewModel>(post,
                                                                  options =>
            {
                options.AfterMap((src, dest) => { dest.PostOptionsDefaultViewModel = postOptions; });
            });

            return(postViewModel);
        }
        public async Task <PostViewModel> GetPost(int postId)
        {
            var post = await GetPostById(postId);

            var postOptions = await _postOptionsRepository.GetAllOptionsByPostId(postId);

            var postViewModel = _mapper.Map <Post, PostViewModel>(post,
                                                                  options =>
            {
                options.AfterMap((src, dest) => { dest.PostOptionsDefaultViewModel = postOptions; });
            });

            if (post.Medias != null)
            {
                postViewModel.MediaViewModel = new MediaViewModel
                {
                    Name = post.Medias.Name,
                    Path = post.Medias.Path
                };
            }

            return(postViewModel);
        }