예제 #1
0
 public ActionResult CreateCategory(CreateCategoryViewModel model)
 {
     if (ModelState.IsValid)
     {
         IArticleManage articleManage = new ArticleManage();
         articleManage.CreateCategory(model.CategoryName, userid: Guid.Parse(Session["userId"].ToString()));
         return(RedirectToAction("CategoryList"));
     }
     ModelState.AddModelError(key: "", errorMessage: "类型创建失败");
     return(View(model));
 }