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