Exemplo n.º 1
0
        public ActionResult _Weather(string station, int year, int month)
        {
            IEnumerable <Weather> result;

            using (var db = new WeatherDataContext())
            {
                var q = from w in db.Weather
                        where w.Station == station && w.Date.Year == year && w.Date.Month == month
                        select w;

                result = q.ToList();
            }

            return(Json(result));
        }
Exemplo n.º 2
0
 public FetchDataService(WeatherDataContext weatherDataContext)
 {
     _weatherDataContext = weatherDataContext;
 }
Exemplo n.º 3
0
 public AddDataService(WeatherDataContext weatherDataContext)
 {
     _weatherDataContext = weatherDataContext;
 }