Esempio n. 1
0
 public static ParkingLot MapTo(ParkingLotVM parkingLotVM)
 {
     return(new ParkingLot
     {
         ParkingID = parkingLotVM.ParkingID,
         ParkingName = parkingLotVM.ParkingName,
         Capacity = parkingLotVM.Capacity,
         Zone = (int?)parkingLotVM.Zone
     });
 }
        public static Reservation MapTo(ReservationVM reservationVM)
        {
            return(new Reservation
            {
                ReservationID = reservationVM.ReservationID,
                CustomerID = reservationVM.CustomerID,
                ParkingID = reservationVM.ParkingID,
                StartDate = reservationVM.StartDate,
                EndDate = reservationVM.EndDate,

                Customer = CustomerVM.MapTo(reservationVM.Customer),
                ParkingLot = ParkingLotVM.MapTo(reservationVM.ParkingLot)
            });
        }