public HttpResponseMessage DeleteDonation(int id) { try { var deleted = _donationRepository.DeleteDonation(id); if (deleted) { return(Request.CreateResponse (HttpStatusCode.OK)); } else { return(Request.CreateErrorResponse(HttpStatusCode.NotFound, "Could not modify donation")); } } catch (Exception) { return(Request.CreateErrorResponse(HttpStatusCode.NotFound, "Exception donation")); } }