コード例 #1
0
        public HotelPackageEditViewModel Update(HotelPackageEditViewModel HotelPackage)
        {
            HotelPackage _HotelPackage = HotelPackageRepo.Update(HotelPackage.toModel());

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

            return(HotelPackage.toViewModel());
        }