public async Task <decimal> ConvertAsync(string fromAsset, string toAsset, decimal amount) { if (fromAsset == toAsset) { return(amount); } var currencyRate = await _currencyRateService.GetByIdAsync(fromAsset, toAsset); if (currencyRate == null) { throw new EntityNotFoundException(); } return(amount * currencyRate.Rate); }