public async Task <GameListHistoryView> GetGamesByPlayerId(int playerId) { List <Game> games = await _gameRepository.GetGamesByPlayerId(playerId); GameListHistoryView data = new GameListHistoryView(); data.Player = _maping.MapPlayerToPlayerGameListHistoryViewItem(await _playerRepository.Get(playerId)); data.Games = _maping.MapGamesToGameGameListHistoryViewItem(games); return(data); }
public async Task <GameListHistoryView> GetGamesByPlayerId(int playerId) { try { GameListHistoryView model = await _historyService.GetGamesByPlayerId(playerId); return(model); } catch (Exception ex) { logger.Error(ex.ToString()); throw; } }