コード例 #1
0
        public ResturantPackageEditViewModel Update(ResturantPackageEditViewModel _ResturantPackage)
        {
            ResturantPacakge ResturantPackage = ResturantPackageRepo.Add(_ResturantPackage.toModel());

            UnitOfWork.commit();
            return(ResturantPackage.toEditViewModel());
        }
コード例 #2
0
 public static ResturantPackageEditViewModel toEditViewModel(this ResturantPacakge model)
 {
     return(new ResturantPackageEditViewModel()
     {
         ID = model.ID,
         DayNumber = model.DayNumber
     });
 }
コード例 #3
0
        public ResturantPackageViewModel GetByID(int id)
        {
            ResturantPacakge _ResturantPackage = ResturantPackageRepo.GetByID(id);

            return(_ResturantPackage.toViewModel());
        }