public ActionResult Delete(int id, FormCollection collection) { Tache c = new Tache(); c = cs.Get(t => t.id == id); cs.Delete(c); cs.Commit(); return(RedirectToAction("Index")); }
// DELETE: api/TacheAPI/5 public IHttpActionResult Delete(int id) { Tache tc = new Tache(); tc = ts.GetById(id); ts.Delete(tc); ts.Commit(); return(Ok("supprime")); }