Esempio n. 1
0
 public IActionResult SeedTopTen()
 {
     try
     {
         _stationRepository.ClearDatabase();
         var topTen = _getWeather.GetForecastTopTenCities();
         _stationRepository.AddStations(topTen);
         return(Ok("Successfully seeded top ten cities."));
     }
     catch (Exception exception)
     {
         return(BadRequest(exception.Message));
     }
 }