コード例 #1
0
        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());
            }
        }