Exemplo n.º 1
0
 public bool DeleteContact(Contact contactToDelete)
 {
     try
     {
         _repository.DeleteContact(contactToDelete);
     }
     catch
     {
         return(false);
     }
     return(true);
 }
Exemplo n.º 2
0
 public ActionResult Delete(Contact contactToDelete)
 {
     try
     {
         _repository.DeleteContact(contactToDelete);
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }