public ActionResult Delete(int id, FormCollection collection) { var p = sp.GetById(id); try { // TODO: Add delete logic here sp.Delete(p); sp.Commit(); return(RedirectToAction("ListeProduit")); } catch { return(View()); } }
public ActionResult Delete(int id, FormCollection collection) { var p = sp.GetById(id); try { // TODO: Add delete logic here sp.Delete(p); sp.Commit(); return(RedirectToAction("ListeProduit")); } catch { return(View()); } }