public SearchResultsFrontPageViewModel(SearchAggregator searchAggregator, IEventAggregator eventAggregator, SimpleContainer container) { _container = container; _eventAggregator = eventAggregator; _sa = searchAggregator; _entities = new BindableCollection <ReturnedEntity>(_sa.GetAllByNoActions()); _eventAggregator.Subscribe(this); }
public void RefreshResults(ReturnedEntity entity) { Repository.Reload(); Entities = new BindableCollection <ReturnedEntity>(_sa.GetAllByNoActions()); try { SelectedItem = Entities?.First(a => a.Type == entity.Type && a.Id == entity.Id); } catch { Console.WriteLine(); } }