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