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