public void CatRemove2(int Id) { InvItemCategory cat = db.InvItemCategories.Find(Id); db.InvItemCategories.Remove(cat); db.SaveChanges(); }
public ActionResult CatRemove2(int Id) { InvItemCategory cat = db.InvItemCategories.Find(Id); db.InvItemCategories.Remove(cat); db.SaveChanges(); return(Json("CatRemove:", JsonRequestBehavior.AllowGet)); }
// GET: InvItems/Delete/5 public ActionResult CatRemove(int id) { InvItemCategory cat = db.InvItemCategories.Find(id); db.InvItemCategories.Remove(cat); db.SaveChanges(); return(RedirectToAction("Index", "InvItems", null)); }