Beispiel #1
0
 public ActionResult Delete(String id, Categorie p)
 {
     p = es.GetById(id);
     es.Delete(p);
     es.Commit();
     return(RedirectToAction("ListCategorie"));
 }
Beispiel #2
0
        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());
            }
        }