Esempio n. 1
0
        /// <summary>
        /// 博客显示页面 /blog/archive/123
        /// </summary>
        /// <param name="postId"></param>
        /// <returns></returns>
        public ActionResult ArchiveShow(int postId)
        {
            var blogInfo = BlogPostService.Get(postId);

            if (blogInfo.Id == 0)
            {
                return(Redirect("/"));
            }

            var spaceInfo = MemberService.Get(blogInfo.UserId);

            //更新浏览数
            BlogPostService.UpdateViewCount(blogInfo.Id);

            //space 模板页专用
            ViewBag.SpaceInfo = spaceInfo;
            return(View(blogInfo));
        }