public async Task <IActionResult> GetAllItemsSortedAsync([FromQuery] string targetCurrency, string product) { var parser = new DataParser(); ConverterLogic logic = new ConverterLogic(); targetCurrency = targetCurrency.ToUpper(); string exchangeData = await parser.GetFileAsync(exchangeUrl, HttpClient); string productData = await parser.GetFileAsync(productUrl, HttpClient); List <ExchangeRate> exchangeRates = parser.ExchangeRateToList(exchangeData, ',', 1); List <Product> products = parser.ProductsToList(productData, ',', 1); Price price = logic.ConvertCurrency(exchangeRates, products, targetCurrency, product); var output = JsonConvert.SerializeObject(price); return(Ok(output)); }