예제 #1
0
        // 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()));
        }
예제 #2
0
        // 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)));
        }