public FoodItemNodeViewModel( IDataRepository dataRepository, ICommand childClickCommand )
     : base(DisplayStrings.AdminFoodItemsTitle, dataRepository, childClickCommand)
 {
     _children =
     new ObservableCollection<TreeNodeViewModel>(
     (from foodItem in dataRepository.GetAllFoodItems()
      select new ClickableTreeNodeViewModel( foodItem.Name, childClickCommand, foodItem.ID )).ToList() );
      Children = new ReadOnlyObservableCollection<TreeNodeViewModel>( _children );
 }
        public AllFoodItemsViewModel( IDataRepository dataRepository )
        {
            _foodItems = new ObservableCollection<FoodItem>( dataRepository.GetAllFoodItems() );
             Items = new ReadOnlyObservableCollection<FoodItem>( _foodItems );

             _dataRepository = dataRepository;
             _dataRepository.ItemAdded += this.OnFoodItemAddedToRepository;
             _dataRepository.ItemDeleted += this.OnFoodItemRemovedFromRepository;
             _dataRepository.ItemModified += this.OnFoodItemModified;
        }