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, "*****@*****.**")); } }
public List <Hotel> ListHotels() { return(_hotelDao.List()); }
public List <Hotel> List() { return(_dao.List()); }
public ActionResult <List <Hotel> > ListHotels() { return(hotelDao.List()); }