Beispiel #1
0
        //
        // GET: /Abonent/Delete/5

        public ActionResult Delete(int id)
        {
            IRepository <Models.Abonent> repo = new AbonentRepository();

            repo.Delete(repo.GetById(id));
            return(RedirectToAction("Index"));
        }
Beispiel #2
0
 public ActionResult Delete(int id, FormCollection collection)
 {
     try
     {
         IRepository <Models.Abonent> repo = new AbonentRepository();
         repo.Delete(repo.GetById(id));
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }