public void Modify(Guid id, Action <T> modificator) { Policy.Handle <DbUpdateConcurrencyException>().Retry(5).Execute(() => _origCreator.Modify(id, modificator)); }
public void Handle(AccountBalanceReplenishEvent msg) { _modelBuilder.Modify(msg.BalanceId, b => b.Amount += msg.Amount.Amount); _publisher.Publish(new BalanceChangeProjectedNotification(msg.BalanceId)); }