Example #1
0
        public Domain.Meetup Handle(CreateMeetupCommand command)
        {
            var meetupId = _repository.GetNextId();

            var meetup = new Domain.Meetup(
                meetupId,
                command.HostUserId,
                command.Name,
                command.SeatsAvailable);

            _repository.Add(meetup);

            _readModelUpdater.OnCreate(meetup);

            _repository.Commit();

            return(meetup);
        }