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