public void Handle(AccountBalanceReplenishEvent msg) { _modelBuilder.Add(new TransactionHistory { BalanceId = msg.BalanceId, EventType = typeof(AccountBalanceReplenishEvent).Name, Event = msg.ToPropsString(), Id = Guid.NewGuid(), TransactionAmount = msg.Amount, Time = DateTimeFacade.Now }); }
public void Handle(AccountCreatedEvent msg) { var businessCurrentBalance = new BusinessAccount { BalanceId = msg.BalanceId, BusinessId = msg.BusinessId }; _modelBuilder.Add(businessCurrentBalance); _publisher.Publish(new BusinessBalanceCreatedProjectedNotification(msg.BalanceId, msg)); }
public void Add(T entity) { Policy.Handle <DbUpdateConcurrencyException>().Retry(5).Execute(() => _origCreator.Add(entity)); }