Пример #1
0
        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"));
        }
Пример #2
0
        // 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"));
        }