/// <inheritdoc />
        public async Task Handle(GroupEventCreatedDomainEvent notification, CancellationToken cancellationToken)
        {
            // TODO: Move this into the domain.
            Attendee attendee = notification.GroupEvent.GetOwner();

            _attendeeRepository.Insert(attendee);

            await _unitOfWork.SaveChangesAsync(cancellationToken);
        }
        /// <inheritdoc />
        public async Task Handle(InvitationAcceptedDomainEvent notification, CancellationToken cancellationToken)
        {
            // TODO: Move this into the domain somehow.
            var attendee = new Attendee(notification.Invitation);

            _attendeeRepository.Insert(attendee);

            await _unitOfWork.SaveChangesAsync(cancellationToken);

            await _mediator.Publish(new AttendeeCreatedEvent(attendee.Id), cancellationToken);
        }
 public ActionResult Add([FromBody] Attendees a)
 {
     try
     {
         rep.Insert(a);
         return(Ok());
     }
     catch (Exception)
     {
         throw;
     }
 }