public ActionResult DeleteConfirmed(int id) { anm_Categories anm_categories = db.anm_Categories.Single(a => a.idcategory == id); db.anm_Categories.DeleteObject(anm_categories); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Create(anm_Categories anm_categories) { if (ModelState.IsValid) { db.anm_Categories.AddObject(anm_categories); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(anm_categories)); }
public ActionResult Edit(anm_Categories anm_categories) { if (ModelState.IsValid) { db.anm_Categories.Attach(anm_categories); db.ObjectStateManager.ChangeObjectState(anm_categories, EntityState.Modified); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(anm_categories)); }
// // GET: /Admin/Category/Delete/5 public ActionResult Delete(int id) { anm_Categories anm_categories = db.anm_Categories.Single(a => a.idcategory == id); return(View(anm_categories)); }
// // GET: /Admin/Category/Details/5 public ViewResult Details(int id) { anm_Categories anm_categories = db.anm_Categories.Single(a => a.idcategory == id); return(View(anm_categories)); }