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