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); }
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); }