public ActionResult NewCategory(GetAllCategory_Result newCategory, string submit) { if (submit == "SaveNew") { using (var ef = new LibraryEntities()) { ef.InsCategory(newCategory.name); } } return(RedirectToAction("Categories", "Category")); }
public ActionResult NewCategory(GetAllCategory_Result newCategory, string submit) { if (submit == "SaveNew") { using (var ef = new LibraryEntities()) { ef.InsCategory(newCategory.name); } } return(RedirectToAction("Categories", "Category")); }