public Participant AddParticipant([FromBody] Participant participant) { var participantToAdd = ParticipantConverter.ConvertDtoToModel(participant); var newParticipant = _participantService.AddParticipant(participantToAdd); return(ParticipantConverter.ConvertModelToDto(newParticipant)); }
public void AddParticipant(object parameter) { Participant participant = new Participant() { Id = id, Name = name, DateOfBirth = dob, Batchid = batchId, CourseRegistered = course, DateOfRegistration = registration }; IParticipant participantObj = new ParticipantService(new Data.WpfDbContext()); participantObj.AddParticipant(participant); }
private void TryCreateNewParticipant(string[] input) { if (input.Length == 4) { _participantService.AddParticipant(new Model.Participant(input)); logger.Info("Added new Participant"); return; } logger.Info("Could not add participant, wrong number of arguments"); }