public JsonResult GetDataPoints(string city, string scaleUnit) { var apiHelper = new ApiHelper(city, scaleUnit); var rootObjectItem = apiHelper.GetWeatherData(); var weatherModel = new WeatherDataModel(); var weatherModelList = weatherModel.GetWeaterForecastList(rootObjectItem); GraphicDataPoints gdp = new GraphicDataPoints(); var result = gdp.GetDataPointObject(weatherModelList); return(Json(result, JsonRequestBehavior.AllowGet)); }
public ActionResult GetGraphic(string city, string scaleUnit) { var apiHelper = new ApiHelper(city, scaleUnit); var rootObjectItem = apiHelper.GetWeatherData(); var weatherModel = new WeatherDataModel(); var weatherModelList = weatherModel.GetWeaterForecastList(rootObjectItem); ViewBag.WeatherList = weatherModelList; return(PartialView()); }