// private helpers

        private BlogPost ConstructBlogPost(BlogPostRequestModel requestModel)
        {
            BlogPost blogPost = _mapper.Map<BlogPostRequestModel, BlogPost>(requestModel);
            blogPost.CreatedOn = DateTimeOffset.Now;
            blogPost.CreationIp = Request.UserHostAddress;
            blogPost.LastUpdatedOn = blogPost.CreatedOn;
            blogPost.LastUpdateIp = Request.UserHostAddress;

            return blogPost;
        }
        public async Task<ActionResult> CreatePost(BlogPostRequestModel requestModel)
        {
            if (ModelState.IsValid)
            {
                BlogPost blogPost = ConstructBlogPost(requestModel);
                await DocumentSession.StoreAsync(blogPost);
                await DocumentSession.SaveChangesAsync();

                return RedirectToAction("Details", new { id = blogPost.Id.ToIntId() });
            }

            return View(requestModel);
        }