public DishAddViewModel(IControllerFactory factory, ICategorySubject subject) { this.factory = factory; this.dish = new DishAddDTO(); this.SaveCommand = new DelegateCommand(Save, CanSave); this.Categories = new ObservableCollection <CategoryDisplayDTO>(); subject.Subscribe(this); Update(); }
public CategoryListViewModel(IControllerFactory factory, ICategorySubject subject) { this.factory = factory; subject.Subscribe(this); this.SelectCommand = new DelegateCommand( () => RaiseCategorySelectedEvent(Category), obj => Category != null); this.Categories = new ObservableCollection <CategoryDisplayDTO>(); Update(); }