public async Task <HttpResponseMessage> CreateParticipant([FromBody] ParticipantDto participant) { HttpResponseMessage result; try { await ParticipantService.CreateParticipant(participant); result = Request.CreateResponse(HttpStatusCode.Created); } catch (Exception e) { Console.WriteLine(e); result = Request.CreateErrorResponse(HttpStatusCode.InternalServerError, e.Message); } return(result); }