public async Task <IEnumerable <ITrip> > FindAllTripsAsync(string @from, string to, DateTime departureDate) { var cars = new List <ITrip>(); var locations = (await mapsService.FindLocationsBetweenAsync(from, to)).ToList(); for (var i = locations.Count - 1; i >= 1; --i) { var result = await FindTripsAsync(from, locations[i], departureDate); cars.AddRange(result); } return(cars); }
public async Task <IEnumerable <string> > Between(string from, string to) { return(await mapsService.FindLocationsBetweenAsync(from, to)); }