Example #1
0
        public ReservationDao()
        {
            hotelDao = new HotelDao();
            DateTime     now    = DateTime.Now;
            List <Hotel> hotels = hotelDao.List();

            if (Reservations == null)
            {
                Reservations = new List <Reservation>();
                Reservations.Add(new Reservation(GetMaxIdPlusOne(), hotels[0], "John Smith", now, now.AddDays(3), 2, "*****@*****.**"));
                Reservations.Add(new Reservation(GetMaxIdPlusOne(), hotels[0], "Anna Blair", now, now.AddDays(1), 1, "*****@*****.**"));
                Reservations.Add(new Reservation(GetMaxIdPlusOne(), hotels[1], "Sam Smith", now, now.AddDays(7), 1, "*****@*****.**"));
            }
        }
Example #2
0
 public List <Hotel> ListHotels()
 {
     return(_hotelDao.List());
 }
Example #3
0
 public List <Hotel> List()
 {
     return(_dao.List());
 }
Example #4
0
 public ActionResult <List <Hotel> > ListHotels()
 {
     return(hotelDao.List());
 }