public async Task <IActionResult> Index() { var model = await _weatherService.GetAll(); model.Currentobservation.Weatherimage = model.Currentobservation.Weatherimage.Insert(0, @"http://forecast.weather.gov/newimages/medium/"); return(View(model)); }
public IActionResult GetAll() { var cityTemp = service.GetAll(); var dto = _mapper.Map <IEnumerable <CityDto> >(cityTemp); return(Json(dto)); }
public IActionResult GetAll([FromServices] IWeatherService weatherService) { return(Ok(weatherService.GetAll())); }
public async Task <IActionResult> Index() { var model = await _weatherService.GetAll(); return(View(model)); }