public ActionResult edit_category(cert_category category) { var cat = db_certs.categories.First(d => d.id == category.id); cat.name = category.name; db_certs.SaveChanges(); return(RedirectToAction("category_management", "Home")); }
public ActionResult add_category(cert_category cat) { db_certs.categories.Add(cat); db_certs.SaveChanges(); return(RedirectToAction("category_management", "Home")); }