示例#1
0
        public WeatherForecast GetWeatherForecast(int days)
        {
            WeatherForecast weatherForecast = new WeatherForecast {
                Days = new List <Day>()
            };

            var solarSystem = _galaxyRepository.GetSolarSystem();

            for (var i = 0; i <= days; i++)
            {
                Day day = GetDayFromNumberOfTheDay(solarSystem, i);
                weatherForecast.Days.Add(day);
            }

            return(weatherForecast);
        }