public ActionResult ArchivePost(BlogPost blogPost) { _res = new Response(); _ops = new MVCBlogOps(); _res = _ops.ArchiveBlogPostToRepo(blogPost); return RedirectToAction("Index", "Home"); }
public ActionResult EditPostGet(int id) { _res = new Response(); _ops = new MVCBlogOps(); BlogPostVM blogPostVM = new BlogPostVM(); _res = _ops.GetBlogPostByIDFromRepo(id); blogPostVM.blogPost = _res.BlogPost; blogPostVM.blogPost.HashTags = _res.BlogPost.HashTags; blogPostVM.blogPost.Mce.Body = _res.BlogPost.Body; blogPostVM.blogPost.Category = _res.BlogPost.Category; blogPostVM.CreateCategoriesList(_ops.GetAllCategoriesFromRepo().Categories); _ops.ArchiveBlogPostToRepo(blogPostVM.blogPost);// return View(blogPostVM); }