public HttpResponseMessage DeleteNEASharingRatio(HttpRequestMessage request, [FromBody] int nEASharingRatioId) { return(GetHttpResponse(request, () => { HttpResponseMessage response = null; // not that calling the WCF service here will authenticate access to the data NEASharingRatio nEASharingRatio = _MPROPEXService.GetNEASharingRatio(nEASharingRatioId); if (nEASharingRatio != null) { _MPROPEXService.DeleteNEASharingRatio(nEASharingRatioId); response = request.CreateResponse(HttpStatusCode.OK); } else { response = request.CreateErrorResponse(HttpStatusCode.NotFound, "No Opex Business Rule found under that ID."); } return response; })); }