Exemplo n.º 1
0
        public async Task ManageEvent(IAggregateInfo aggregateInfo, int eventVersion, IEvent e)
        {
            var dto = EventStoreMapper.EventMapper(aggregateInfo, eventVersion, e);

            try
            {
                await _service.Save(dto);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 2
0
        public async Task ManageEvent(IAggregateInfo aggregateInfo, int eventVersion, IEvent e)
        {
            var dto = EventStoreMapper.EventMapper(aggregateInfo, eventVersion, e);

            try
            {
                await _service.Save(dto);

                _presenter.PublishAmountDeposited(dto.AggregateId, dto.AggregateData);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 3
0
        public async Task ManageEvent(IAggregateInfo aggregateInfo, int eventVersion, IEvent e)
        {
            var dto = EventStoreMapper.EventMapper(aggregateInfo, eventVersion, e);

            try
            {
                await _service.Save(dto);

                _presenter.PublishAccountCreated(dto.AggregateId, dto.AggregateData);
            }
            catch (Exception ex)
            {
                _presenter.PublishErrorCreatingAccount(ex.Message);
                throw;
            }
        }