public IActionResult GetPath(string destinationCode) { var startCode = "USA"; destinationCode = destinationCode.ToUpper(); if (_countryRepository.CheckIfCountryExists(destinationCode)) { var path = _countryRepository.FindPath(startCode, destinationCode); var result = new { destination = destinationCode, list = path }; return(Ok(result)); } return(BadRequest($"Can't find country code {destinationCode}")); }