public async Task<ActionResult> AddCategory(Category category)
 {
     if (ModelState.IsValid)
     {
         await _iCategoryBL.AddCategory(category);
     }
     else
     {
         ModelState.AddModelError("", "Name and Description are mandatory");
     }
     return RedirectToAction("Categories");
 }
Ejemplo n.º 2
0
 public async Task AddCategory(Category category)
 {
     await _iDalCategory.InsertAsync(category);
 }