public async Task <IActionResult> Get(string city) { if (string.IsNullOrEmpty(city)) { return(BadRequest()); } var entity = await _repo.FetchWeatherForecast(city); if (entity == null) { return(NotFound()); } await _repo.SaveWeatherForecast(entity); return(Ok(MapHelper.MapToViewModel(entity))); }