示例#1
0
        public async Task <AttendeeVO> JoinAtSessionTaskAsync(AttendeeVO newAttendee)
        {
            AttendeeModel newAttendeeModel = _attendeeConverter.Parse(newAttendee);

            if (!(await _attendeeRepository.AddAttendeeTaskAsync(newAttendeeModel) is AttendeeModel addedAttendeeModel))
            {
                throw new Exception("Nao foi possivel adicionar o participante na sessao");
            }

            return(_attendeeConverter.Parse(addedAttendeeModel));
        }