public MealNodeViewModel( IDataRepository dataRepository, ICommand childClickCommand ) : base(DisplayStrings.DailyLogMealTitle, dataRepository, childClickCommand) { _currentDate = DateTime.Now.Date; _dataRepository = dataRepository; var meals = dataRepository.GetAllMealsForDate( _currentDate ); _children = new ObservableCollection<TreeNodeViewModel>( (from meal in dataRepository.GetAllMealsForDate( _currentDate ) select new ClickableTreeNodeViewModel( meal.Name, childClickCommand, meal.ID )).ToList() ); Children = new ReadOnlyObservableCollection<TreeNodeViewModel>( _children ); }