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


            return(Ok(model));
        }
Пример #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());
        }
Пример #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);
        }
Пример #4
0
 public FlightRepository(FlightDb dbContext)
 {
     _dbContext = dbContext;
 }
Пример #5
0
        public IHttpActionResult GetAllFlights()
        {
            var db = new FlightDb();

            return(Ok(db.Flights));
        }
Пример #6
0
 public ReservationRepository(FlightDb dbContext)
 {
     _dbContext = dbContext;
 }
Пример #7
0
 public PassengerRepository(FlightDb dbContext)
 {
     _dbContext = dbContext;
 }