public HttpResponseMessage DeleteOpexAbcExemption(HttpRequestMessage request, [FromBody] int opexAbcExemptionId) { return(GetHttpResponse(request, () => { HttpResponseMessage response = null; // not that calling the WCF service here will authenticate access to the data OpexAbcExemption opexAbcExemption = _MPROPEXService.GetOpexAbcExemption(opexAbcExemptionId); if (opexAbcExemption != null) { _MPROPEXService.DeleteOpexAbcExemption(opexAbcExemptionId); response = request.CreateResponse(HttpStatusCode.OK); } else { response = request.CreateErrorResponse(HttpStatusCode.NotFound, "No opexAbcExemption found under that ID."); } return response; })); }