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