public HttpResponseMessage DeleteExpenseRawBasis(HttpRequestMessage request, [FromBody] int expenseRawBasisId) { return(GetHttpResponse(request, () => { HttpResponseMessage response = null; // not that calling the WCF service here will authenticate access to the data ExpenseRawBasis expenseRawBasis = _MPROPEXService.GetExpenseRawBasis(expenseRawBasisId); if (expenseRawBasis != null) { _MPROPEXService.DeleteExpenseRawBasis(expenseRawBasisId); response = request.CreateResponse(HttpStatusCode.OK); } else { response = request.CreateErrorResponse(HttpStatusCode.NotFound, "No Expense Basis found under that ID."); } return response; })); }