Example #1
0
        public async void LoadPlayers()
        {
            if (DesignerProperties.GetIsInDesignMode(
                    new System.Windows.DependencyObject()))
            {
                return;
            }

            //Players = new ObservableCollection<Player>(await _repo.GetPlayersAsync());
            _allPlayers = await _repo.GetPlayersAsync();

            Players = new ObservableCollection <Player>(_allPlayers);
        }
Example #2
0
        public async Task <IActionResult> GetPlayersAsync()
        {
            var players = await _playerRepository.GetPlayersAsync();

            return(Ok(players));
        }