public void AddSubRoute(SubRoute subRoute) { RouteSubRoutes.Add(subRoute); SetMiddleCity(); Cost = RouteSubRoutes.Sum(x => x.Cost); Time = RouteSubRoutes.Sum(x => x.Time); }
public List <Stop> GetStops() { var stops = RouteSubRoutes.Select(x => x.From).ToList(); stops.Add(Destination); return(stops); }