public HttpResponseMessage DeleteIndividualImpairment(HttpRequestMessage request, [FromBody] int individualImpairmentId) { return(GetHttpResponse(request, () => { HttpResponseMessage response = null; // not that calling the WCF service here will authenticate access to the data IndividualImpairment individualImpairment = _LoanService.GetIndividualImpairment(individualImpairmentId); if (individualImpairment != null) { _LoanService.DeleteIndividualImpairment(individualImpairmentId); response = request.CreateResponse(HttpStatusCode.OK); } else { response = request.CreateErrorResponse(HttpStatusCode.NotFound, "No individualImpairment found under that ID."); } return response; })); }