/// <summary> /// Grab once /// </summary> protected virtual void Grab() { if (GrabIsInProcess) { return; } GrabIsInProcess = true; var cities = Grabber.GrabCities().ToList(); cities = HandleUnknownCities(cities); // Process all the cities foreach (var city in cities) { Console.WriteLine("Fetching data for: {0}", city.ToString()); var forecasts = Grabber.GrabForecastForTomorrow(city).ToList(); foreach (var forecast in forecasts) { var daForecast = TinyMapper.Map <Dm.WeatherForecast.DataAccess.Contract.Forecast>(forecast); DataAccess.AddOrUpdateForecast(daForecast); } } GrabIsInProcess = false; }