Exemplo n.º 1
0
        public ActionResult Blog(string id)
        {
            var blogPost = _blogRepo.GetBlogPostByRouteName(id);

            var model = new BlogBlogVM
            {
                Id    = blogPost.Id,
                Date  = blogPost.Date.ToString("MMMM d, yyyy"),
                Text  = blogPost.Text,
                Title = blogPost.Title
            };

            return(View(model));
        }