Ejemplo n.º 1
0
        public Data.Models.CarRent ToDataModel()
        {
            var dataModel = new Data.Models.CarRent {
                Id = Id
            };

            FillDataModel(dataModel);
            return(dataModel);
        }
Ejemplo n.º 2
0
 public void FillDataModel(Data.Models.CarRent carRentDataModel)
 {
     carRentDataModel.CarNumber      = CarNumber;
     carRentDataModel.RentLocation   = RentLocation;
     carRentDataModel.RentTime       = RentTime;
     carRentDataModel.ReturnLocation = ReturnLocation;
     carRentDataModel.ReturnTime     = ReturnTime;
     carRentDataModel.Price          = Price;
 }
Ejemplo n.º 3
0
 public static CarRent FromDataModel(Data.Models.CarRent carRent)
 {
     return(new CarRent
     {
         Id = carRent.Id,
         CarNumber = carRent.CarNumber,
         RentLocation = carRent.RentLocation,
         RentTime = carRent.RentTime,
         ReturnLocation = carRent.ReturnLocation,
         ReturnTime = carRent.ReturnTime,
         Price = carRent.Price
     });
 }