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