public HttpResponseMessage DeleteTeamClassification(HttpRequestMessage request, [FromBody] int teamClassificationId) { return(GetHttpResponse(request, () => { HttpResponseMessage response = null; // not that calling the WCF service here will authenticate access to the data SCDTeamClassification teamClassification = _ScorecardService.GetSCDTeamClassification(teamClassificationId); if (teamClassification != null) { _ScorecardService.DeleteSCDTeamClassification(teamClassificationId); response = request.CreateResponse(HttpStatusCode.OK); } else { response = request.CreateErrorResponse(HttpStatusCode.NotFound, "No teamClassification found under that ID."); } return response; })); }