Пример #1
0
        public ResturantMenuItemEditViewModel Update(ResturantMenuItemEditViewModel _ResturantMenuItem)
        {
            ResturantMenuItem ResturantMenuItem = ResturantMenuItemRepo.Add(_ResturantMenuItem.toModel());

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

            return(_ResturantMenuItem.toViewModel());
        }