Exemple #1
0
 public async Task <ActionResult> CreateCategory(Category category)
 {
     if (ModelState.IsValid)
     {
         _categoryContext.Create(category);
         return(RedirectToAction("CategoryList"));
     }
     return(View("Category/CreateCategory", category));
 }