public async Task <ActionResult> Update(int id) { try { var currentForecast = await _repo.GetAsync(id); var newForecast = await _weatherSvc.GetWeatherForecastAsync(currentForecast.City); currentForecast.Description = newForecast.Description; currentForecast.TemperatureCelsius = newForecast.TemperatureCelsius; await _repo.UpdateAsync(currentForecast); return(RedirectToAction("Index")); } catch (WeatherServiceException exc) { return(new HttpNotFoundResult(exc.Message)); } }