public ResturantMenuItemEditViewModel Update(ResturantMenuItemEditViewModel _ResturantMenuItem) { ResturantMenuItem ResturantMenuItem = ResturantMenuItemRepo.Add(_ResturantMenuItem.toModel()); UnitOfWork.commit(); return(ResturantMenuItem.toEditViewModel()); }
public static ResturantMenuItemEditViewModel toEditViewModel(this ResturantMenuItem model) { return(new ResturantMenuItemEditViewModel() { ID = model.ID, Image = model.Image, ItemName = model.ItemName }); }
public ResturantMenuItemViewModel GetByID(int id) { ResturantMenuItem _ResturantMenuItem = ResturantMenuItemRepo.GetByID(id); return(_ResturantMenuItem.toViewModel()); }