public void ReserveRoom(RoomReservation roomReservation)
 {
     using (var data = new RoomReservationContext())
     {
         data.RoomReservations.Add(roomReservation);
         data.SaveChanges();
     }
 }
Exemplo n.º 2
0
 public void ReserveRoom(RoomReservation roomReservation)
 {
     using (RoomReservationDataContext data = new RoomReservationDataContext())
     {
         data.RoomReservations.InsertOnSubmit(roomReservation);
         data.SubmitChanges();
     }
 }