public GamesHistoryViewModel GetGamesHistory() { List <Game> gamesHistoryInfo = _gameRepository.GetGamesHistory(_userId).ToList(); var gamesHistory = new GamesHistoryViewModel { Games = Mapper.Map <List <Game>, IEnumerable <GameGamesHistoryViewModel> >(gamesHistoryInfo) }; return(gamesHistory); }
public IActionResult Get() { GamesHistoryViewModel gamesHistory = _historyService.GetGamesHistory(); return(Ok(gamesHistory)); }
public GamesHistoryView(IDataAccess dataAccess) { InitializeComponent(); DataContext = new GamesHistoryViewModel(dataAccess); }