public ActionResult Delete(String id, Categorie p) { p = es.GetById(id); es.Delete(p); es.Commit(); return(RedirectToAction("ListCategorie")); }
public ActionResult Delete(int id, FormCollection collection) { try { // TODO: Add delete logic here // TODO: Add delete logic here Service.Delete(Service.GetById(id)); Service.Commit(); return(RedirectToAction("Index")); } catch { return(View()); } }