public ActionResult CreatePostGet() { _ops = new MVCBlogOps(); BlogPostVM blogPostVM = new BlogPostVM(); _res = new Response(); _res = _ops.GetAllCategoriesFromRepo(); blogPostVM.CreateCategoriesList(_res.Categories); return View(blogPostVM); }
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); }