Exemplo n.º 1
0
 public ActionResult Delete(int id)
 {
     try
     {
         repository.Delete(id);
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }
Exemplo n.º 2
0
 public ActionResult Delete(int id)
 {
     try
     {
         _repository.Delete(id);
         return View("Index");
     }
     catch
     {
         return View();
     }
 }
Exemplo n.º 3
0
 public ActionResult Delete(int id)
 {
     try
     {
         //delete record
         repository.Delete(id);
         return(View());
     }
     catch
     {
         return(View());
     }
 }
Exemplo n.º 4
0
 public ActionResult Delete(int id)
 {
     try
     {
         //delete Manufacturer
         repository.Delete(id);
         return(View());
     }
     catch (Exception e)
     {
         return(View(e));
     }
 }
Exemplo n.º 5
0
 public ActionResult Delete(int id)
 {
     try
     {
         // TODO: Add delete logic here
         _repos.Delete(id);
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }