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