public async Task StartAsync(CancellationToken cancellationToken)
        {
            // Create a new scope to retrieve scoped services
            using (var scope = _serviceProvider.CreateScope())
            {
                // Get the DbContext instance
                var forecastContext = scope.ServiceProvider.GetRequiredService <ForecastContext>();

                var solarSystem          = SolarSystemFactory.GenerateSolarSystem();
                var weatherControlSystem = new WeatherControlSystem(solarSystem);
                await forecastContext.Forecasts.AddRangeAsync(weatherControlSystem.CalculateForecast(3650));

                await forecastContext.SaveChangesAsync();
            }
        }
        public void SolarSystem_GetForecast_ReturnForecast()
        {
            var earth   = new Planet("Earth", 1000, 1);
            var mars    = new Planet("Mars", 2000, 3);
            var neptune = new Planet("Neptune", 3000, 5);
            var planets = new List <Planet>()
            {
                earth, mars, neptune
            };

            var solarSystem          = new Entities.SolarSystem.SolarSystem(planets);
            var weatherControlSystem = new WeatherControlSystem(solarSystem);
            var forecast             = weatherControlSystem.CalculateForecast(50);

            forecast.Count.Should().Be(50);
        }