コード例 #1
0
        public async Task <decimal> ConvertExchangeRateAsync(ExchangeRateRequestDto input)
        {
            var exchangeRate = await _currencyManager.ConvertExchangeRateAsync(input.FromCurrencyCode, input.ToCurrencyCode);

            if (input.Money.HasValue & input.Money > 0)
            {
                return(input.Money.Value * exchangeRate);
            }
            else
            {
                return(exchangeRate);
            }
        }
コード例 #2
0
 public Task <decimal> ConvertExchangeRateAsync(ExchangeRateRequestDto input)
 {
     return(_currencyAppService.ConvertExchangeRateAsync(input));
 }