Ejemplo n.º 1
0
        public void Handle(Commands.AddRate command)
        {
            var currency    = _uow.R <Currency>().Get(command.CurrencyId);
            var destination = _uow.R <Currency>().Get(command.DestinationCurrencyId);

            currency.AddRate(command.Factor, destination, command.EffectiveTill);
        }
Ejemplo n.º 2
0
        public async Task Handle(Commands.AddRate command, IHandleContext ctx)
        {
            var currency = await _uow.For <Currency>().Get(command.CurrencyId);

            var destination = await _uow.For <Currency>().Get(command.DestinationCurrencyId);

            currency.AddRate(command.Factor, destination, command.EffectiveTill);
        }