示例#1
0
        public GamesHistoryViewModel GetGamesHistory()
        {
            List <Game> gamesHistoryInfo = _gameRepository.GetGamesHistory(_userId).ToList();
            var         gamesHistory     = new GamesHistoryViewModel
            {
                Games = Mapper.Map <List <Game>, IEnumerable <GameGamesHistoryViewModel> >(gamesHistoryInfo)
            };

            return(gamesHistory);
        }
示例#2
0
        public IActionResult Get()
        {
            GamesHistoryViewModel gamesHistory = _historyService.GetGamesHistory();

            return(Ok(gamesHistory));
        }
 public GamesHistoryView(IDataAccess dataAccess)
 {
     InitializeComponent();
     DataContext = new GamesHistoryViewModel(dataAccess);
 }