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