public ActionResult DeleteConfirmed(int id) { category_table category_table = db.category_tables.Find(id); db.category_tables.Remove(category_table); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "cat_id,cat_name")] category_table category_table) { if (ModelState.IsValid) { db.Entry(category_table).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(category_table)); }
public ActionResult Create([Bind(Include = "cat_id,cat_name")] category_table category_table) { if (ModelState.IsValid) { db.category_tables.Add(category_table); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(category_table)); }