public IHttpActionResult GetAllFlights()
        {
            var db    = new FlightDb();
            var model = db.Flight;


            return(Ok(model));
        }
Esempio n. 2
0
        public static List <Flight> executeLinq_forfiltering_flights(ref FlightDb dbobj, DateTime?filterdate)
        {
            var mylist = from a in dbobj.flights_table
                         where a.Departure_date == filterdate
                         select a;

            return(mylist.ToList());
        }
Esempio n. 3
0
        public List <Seats> getSeats(ref FlightDb dbobj)
        {
            int fligthid = (int)Session["flight"];
            var somelist = (from a in dbobj.tableof_seats
                            where a.seatcapacity > 0 && a.whatflightId == fligthid
                            select a).ToList();

            return(somelist);
        }
Esempio n. 4
0
 public FlightRepository(FlightDb dbContext)
 {
     _dbContext = dbContext;
 }
Esempio n. 5
0
        public IHttpActionResult GetAllFlights()
        {
            var db = new FlightDb();

            return(Ok(db.Flights));
        }
Esempio n. 6
0
 public ReservationRepository(FlightDb dbContext)
 {
     _dbContext = dbContext;
 }
Esempio n. 7
0
 public PassengerRepository(FlightDb dbContext)
 {
     _dbContext = dbContext;
 }