Beispiel #1
0
        public HotelPackageEditViewModel Update(HotelPackageEditViewModel HotelPackage)
        {
            HotelPackage _HotelPackage = HotelPackageRepo.Update(HotelPackage.toModel());

            unitOfWork.commit();
            return(_HotelPackage.toEditViewModel());
        }
 public static HotelPackageEditViewModel toEditViewModel(this HotelPackage model)
 {
     return(new HotelPackageEditViewModel()
     {
         ID = model.ID,
         DayNumber = model.DayNumber
     });
 }
 public static HotelPackageViewModel toViewModel(this HotelPackage model)
 {
     return(new HotelPackageViewModel()
     {
         ID = model.ID,
         DayNumber = model.DayNumber,
         HotelID = model.HotelID,
         PackageID = model.PackageID
     });
 }
Beispiel #4
0
        public HotelPackageViewModel GetByID(int id)
        {
            HotelPackage HotelPackage = HotelPackageRepo.GetByID(id);

            return(HotelPackage.toViewModel());
        }