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