Beispiel #1
0
        public CityAQIPublishLive getCityAir(int cityid)
        {
            CityAQIPublishLive r  = null;
            MyContext          db = new MyContext();

            r = db.CityAQIPublishLives.FirstOrDefault(a => a.CityCode == cityid);

            db.Dispose();
            return(r);
        }
Beispiel #2
0
        private static void showCityLive(CityAQIPublishLive cl)
        {
            var msg = String.Format("{0,10}|{1,5}|{2,8}|{3,14}|{4,12:g}", cl.Area, cl.AQI, cl.Quality, cl.PrimaryPollutant, cl.TimePoint);

            Console.WriteLine(msg);
        }