Beispiel #1
0
 public HttpResponseMessage Delete(Guid id)
 {
     try
     {
         _contactCrudService.DeleteContact(id);
         return(Request.CreateResponse(HttpStatusCode.OK));
     }
     catch (ValidationException ex)
     {
         return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ex.Message));
     }
 }
 public ActionResult DeleteConfirmed(Guid id)
 {
     _contactCrudService.DeleteContact(id);
     return(RedirectToAction("Index"));
 }