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