public IEnumerable <StopDTO> GetAllConnectedToAnyLine() { var stopsDTOs = Mapper.Map <IEnumerable <Stop>, IEnumerable <StopDTO> > (_stopRepository.GetAllConnectedToAnyLine()); return(stopsDTOs); }
public FastestPathDTO SearchFastestConnections(SearchInputDTO searchInputDTO) { _searchValidator.Validate(searchInputDTO); var searchInput = _searchInputManualMapper.ToDomain(searchInputDTO); var stops = _stopRepository.GetAllConnectedToAnyLine(); var stopGraph = _graphGenerator.CreateGraph(stops, searchInput.StartDate); var fastestConnections = _connectionSearchEngine.SearchConnections(searchInput, stopGraph); var fastestPath = _fastestPathResolver.ResolveFastestPath(searchInput, fastestConnections); var fastestPathDTO = Mapper.Map <FastestPath, FastestPathDTO>(fastestPath); fastestPathDTO.PathDescription = _fastestPathDescriptionWriter.WriteDescription(searchInput, fastestPath); return(fastestPathDTO); }