public FleetVehicle GetOneCar(int id)
        {
            FleetVehiclesLogic fleetVehiclesLogic = new FleetVehiclesLogic(DB);
            FleetVehicle       fleetVehicle       = fleetVehiclesLogic.GetOneCarFromFleet(id).ConvertToCar();

            return(fleetVehicle);
        }
        public ReservationModel AddReservation(ReservationModel reservationModel)
        {
            FleetVehiclesLogic fleetVehicleLogic = new FleetVehiclesLogic(DB);

            fleetVehicleLogic.UpdateUsed(reservationModel.CarsID);
            Reservation reservation = reservationModel.ConvertToReservation();

            DB.Reservations.Add(reservation);
            DB.SaveChanges();

            reservationModel.ReservationID = reservation.ReservationId;
            return(reservationModel);
        }
 public FleetVehiclesController(FleetVehiclesLogic logic)
 {
     FleetVehiclesLogic = logic;
 }