private void AddFavourites() { ShowLoader(); Favourites.Clear(); Favourites.AddRange(UnitOfWork.FavouriteRepository.GetAll().OrderByDescending(x => x.LastUsedDate)); ShowList(); }
private void TimerTickSearch(object sender, EventArgs e) { timerSearch.Stop(); ShowHeaderLoader(); if (isFavouritesView) { IEnumerable <Favourite> favourites = UnitOfWork.FavouriteRepository.GetByName(searchText); Favourites.Clear(); Favourites.AddRange(favourites); } else { IEnumerable <Recent> recentTrips = UnitOfWork.RecentTripRepository.GetByName(searchText); RecentTrips.Clear(); RecentTrips.AddRange(recentTrips); } HideHeaderLoader(); ShowList(); }