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 }); }
public HotelPackageViewModel GetByID(int id) { HotelPackage HotelPackage = HotelPackageRepo.GetByID(id); return(HotelPackage.toViewModel()); }