public string Get(string origin, string destination) { var originRow = ApplicationDb.RunQueryAndReturnFirstRow($"Select * from airports.csv where [IATA 3] = \"{origin}\""); var destinationRow = ApplicationDb.RunQueryAndReturnFirstRow($"Select * from airports.csv where [IATA 3] = \"{destination}\""); if (originRow == null) { return("Invalid Origin"); } if (destinationRow == null) { return("Invalid Destination"); } var logic = new Logic(); string path = logic.GetShortestPath(origin, destination); if (string.IsNullOrEmpty(path)) { return("No Route"); } else { return(path); } }