public ActionResult AddCategory(FrameworxCategory category) { try { _frameworxProjectService.AddCategory(category); return(RedirectToAction("AddComponent")); } catch (DbUpdateException ex) { ViewBag.message = "Category Name already exists"; return(View(ex)); } catch { return(View()); } }
public void AddCategory(FrameworxCategory category) { _FrameworxProjectDatabaseContext.Add(category); }