Beispiel #1
0
        public RegistrationResultDto Register([FromBody] RegistrationDto registrationDto)
        {
            var model = _registrationRepository.CreateAndAdd();

            _mapper.Map(source: registrationDto, destination: model);
            _mapper.Map(source: registrationDto, destination: model.Applicant);
            _collectionMapper.MapCollection(source: registrationDto.Participants, destination: model.RegistrationParticipants);

            _unitOfWork.Commit();

            _queue.Publish(new InterestRegisteredMessage(model.Id));

            return(new RegistrationResultDto
            {
                ApplicantId = model.ApplicantId,
                RegistrationId = model.Id
            });
        }