Example #1
0
        public ResturantMenuItemEditViewModel Update(ResturantMenuItemEditViewModel _ResturantMenuItem)
        {
            ResturantMenuItem ResturantMenuItem = ResturantMenuItemRepo.Add(_ResturantMenuItem.toModel());

            UnitOfWork.commit();
            return(ResturantMenuItem.toEditViewModel());
        }
Example #2
0
 public static ResturantMenuItemEditViewModel toEditViewModel(this ResturantMenuItem model)
 {
     return(new ResturantMenuItemEditViewModel()
     {
         ID = model.ID,
         Image = model.Image,
         ItemName = model.ItemName
     });
 }
Example #3
0
        public ResturantMenuItemViewModel GetByID(int id)
        {
            ResturantMenuItem _ResturantMenuItem = ResturantMenuItemRepo.GetByID(id);

            return(_ResturantMenuItem.toViewModel());
        }