Exemplo n.º 1
0
        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));
        }
Exemplo n.º 3
0
 public IActionResult  GetAll([FromServices] IWeatherService weatherService)
 {
     return(Ok(weatherService.GetAll()));
 }
Exemplo n.º 4
0
        public async Task <IActionResult> Index()
        {
            var model = await _weatherService.GetAll();

            return(View(model));
        }