Exemplo n.º 1
0
 public void Insert(UserBookingDTO userBooking)
 {
     using (CarRentalEntities context = new CarRentalEntities())
     {
         context.usp_UserBooking_Insert(userBooking.is_Driver, userBooking.is_Going, userBooking.Id_Booking, userBooking.Id_User);
     }
 }
Exemplo n.º 2
0
        public void Insert(byte is_Driver, byte is_Going, int Id_Booking, int Id_User)
        {
            UserBookingDTO userBooking = new UserBookingDTO
            {
                is_Driver  = is_Driver,
                is_Going   = is_Going,
                Id_Booking = Id_Booking,
                Id_User    = Id_User
            };

            userBookingEngine.Insert(userBooking);
        }
Exemplo n.º 3
0
        public List <UserBookingDTO> MapToListUserBookingDTO(List <UserBooking> userBookings)
        {
            List <UserBookingDTO> retour = new List <UserBookingDTO>();

            foreach (UserBooking userBooking in userBookings)
            {
                UserBookingDTO newUserBooking = new UserBookingDTO
                {
                    Id_Booking = userBooking.Id_Booking,
                    is_Driver  = userBooking.is_Driver,
                    is_Going   = userBooking.is_Going
                };

                retour.Add(newUserBooking);
            }

            return(retour);
        }