예제 #1
0
        public WeatherStation GetId(int id)
        {
            var db      = new TideTrackerContext();
            var station = this.db.WeatherStations.FirstOrDefault(w => w.StationId == id);

            return(station);
        }
        public IEnumerable <WeatherStation> GetState(string state)
        {
            var db = new TideTrackerContext();

            var stationByState = this.db.WeatherStations.Where(w => w.State == state);

            return(stationByState);
        }
예제 #3
0
 public WeatherResultsController(TideTrackerContext _db)
 {
     this.db = _db;
 }
 public WeatherStationsController(TideTrackerContext _db)
 {
     this.db = _db;
 }