public ResturantPackageEditViewModel Update(ResturantPackageEditViewModel _ResturantPackage) { ResturantPacakge ResturantPackage = ResturantPackageRepo.Add(_ResturantPackage.toModel()); UnitOfWork.commit(); return(ResturantPackage.toEditViewModel()); }
public static ResturantPackageEditViewModel toEditViewModel(this ResturantPacakge model) { return(new ResturantPackageEditViewModel() { ID = model.ID, DayNumber = model.DayNumber }); }
public ResturantPackageViewModel GetByID(int id) { ResturantPacakge _ResturantPackage = ResturantPackageRepo.GetByID(id); return(_ResturantPackage.toViewModel()); }