public ActionResult Edit() { int postId = CECRequest.GetQueryInt("id", 0); var model = BlogPostService.Get(postId, PlantEngContext.Current.UserId); return(View(model)); }
/// <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)); }
public ActionResult <List <BlogPost> > Get() => _blogPostService.Get();