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

            return(View(model));
        }