public ActionResult Delete(int id, FormCollection collection) { try { ServiceJediClient service = new ServiceJediClient(); StadeWCF stade = service.getAllStade().ToList().Find(x => x.Id == id); if (stade == null) { return HttpNotFound(); } service.deleteStade(stade); return RedirectToAction("Index"); } catch { return View(); } }
public ActionResult Delete(int id, FormCollection collection) { try { ServiceJediClient service = new ServiceJediClient(); StadeWCF stade = service.getAllStade().ToList().Find(x => x.Id == id); if (stade == null) { return(HttpNotFound()); } service.deleteStade(stade); return(RedirectToAction("Index")); } catch { return(View()); } }