public ICollection <IEvent> Handle(CreateEmailAccount command)
        {
            var emailAccount = EmailAccount.CreateNew(command, _validator);

            _emailAccountRepository.Create(emailAccount);

            return(emailAccount.Events);
        }
Beispiel #2
0
        public IAggregateRoot Handle(CreateEmailAccount command)
        {
            var emailAccount = EmailAccount.CreateNew(command, _validator);

            _emailAccountRepository.Create(emailAccount);

            return(emailAccount);
        }