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