예제 #1
0
 public ActionResult Create(SubCategory SubCategory)
 {
     if (ModelState.IsValid)
     {
         Handler.AddSubCategory(SubCategory);
         return(RedirectToAction("Index", "SubCategory"));
     }
     ViewBag.CategoryId = new SelectList(Context.Categories, "Id", "Name", SubCategory.CategoryId);
     return(View(SubCategory));
 }