// GET: Admin/Blog/Create public ActionResult Create() { ViewBag.AuthorID = BlogAuthors.AuthorList(Guid.Empty); BlogCategories blogCatgories = new BlogCategories("en-US"); ViewBag.AllCategories = blogCatgories.Categories(); return(View(new BlogPostViewModel())); }
// GET: Admin/Blog/Edit/<PostSerial> public ActionResult Edit(int id) { BlogPost post = new BlogPost(id); ViewBag.AuthorID = BlogAuthors.AuthorList(post.AuthorID); BlogCategories blogCatgories = new BlogCategories("en-US"); ViewBag.AllCategories = blogCatgories.Categories(); return(View(new BlogPostViewModel(post))); }