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