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