Exemplo n.º 1
0
        public Participant AddParticipant([FromBody] Participant participant)
        {
            var participantToAdd = ParticipantConverter.ConvertDtoToModel(participant);
            var newParticipant   = _participantService.AddParticipant(participantToAdd);

            return(ParticipantConverter.ConvertModelToDto(newParticipant));
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        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");
        }