public async Task <IActionResult> Get(string product, [FromQuery] string targetCurrency) { HttpResponseMessage responseProducts = await client.GetAsync("Prices.csv"); responseProducts.EnsureSuccessStatusCode(); HttpResponseMessage responseParities = await client.GetAsync("ExchangeRates.csv"); responseParities.EnsureSuccessStatusCode(); string productsString = await responseProducts.Content.ReadAsStringAsync(); string paritiesString = await responseParities.Content.ReadAsStringAsync(); IEnumerable <Product> products = reader.ParseProducts(productsString); IEnumerable <Parity> parities = reader.ParseParities(paritiesString); decimal price = converter.CalculatePrice(product, targetCurrency, products, parities); return(Ok(new Response(price))); }