public void LoadGames() { var games = new ObservableCollection <Game>(GameDataService.GetAllGames()); Games = new ObservableCollection <Game>(); foreach (var game in games) { if (game.Matches.Any(m => m.User.Id == LoginUser.Id) && game.Matches.Count() <= 1) { Games.Add(game); } } }
public void LoadGames() { Games = new ObservableCollection <Game>(GameDataservice.GetAllGames()); }