private async Task LoadTable() { Ad ad = new Ad(); var adList = await(ad.GetAllAdsForFavorites()); var favoredAds = adList.Where(row => row.IsLiked).ToList(); for (int i = 0; i < favoredAds.Count; i++) { string adID = favoredAds[i].ID; var adLocal = await AdLocal.GetAdLocalByAdID(adID); if (adLocal == null || string.IsNullOrEmpty(adLocal.AdID)) { adLocal = new AdLocal(); adLocal.AdID = adID; adLocal.Sequence = favoredAds.Count; } favoredAds[i].ClientFavoritesSortOrder = adLocal.Sequence; favoredAds[i].Notes = adLocal.Notes; } favoredAds = favoredAds.OrderBy(row => row.ClientFavoritesSortOrder).ToList(); InvokeOnMainThread(() => { LoadingOverlayProperty.Hide(); FavoritesAdList = favoredAds; FavoritesTableView.Source = new FavoritesTableSource(this); FavoritesTableView.ReloadData(); }); }