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