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