예제 #1
0
 public bool Update(Booking item)
 {
     if (item == null)
     {
         throw new ArgumentNullException("item");
     }
     if (BookingDBManager.Update(item) == 0)
     {
         return(false);
     }
     else
     {
         return(true);
     }
 }
예제 #2
0
 public Booking AddBooking(Booking item)
 {
     if (item == null)
     {
         throw new ArgumentNullException("item");
     }
     if (BookingDBManager.AddBooking(item) == 0)
     {
         return(null);
     }
     else
     {
         return(item);
     }
 }
예제 #3
0
 public Booking GetById(int id)
 {
     return(BookingDBManager.GetBookingById(id));
 }
예제 #4
0
 public IEnumerable <Booking> GetAll()
 {
     return(BookingDBManager.GetAllBookings().Cast <Booking>());
 }