예제 #1
0
        //============ Constructors =================//

        public GameService(int id)
        {
            _context = new Context();
            _id = id;
            _gameStat = GameStatistic(_id, _context);
            _game = FetchGameByGameStatistic(_gameStat);
        }
예제 #2
0
 private Game FetchGameByGameStatistic(GameStatistic gameStatistic)
 {
     var query = (from game in _context.Games
                  where gameStatistic.GameRefNum == game.RefNum
                  select game).Single();
     return query;
 }
예제 #3
0
 //============= Constructors =================//
 public GameViewModel(int id)
 {
     _gameService = new GameService(id);
     _gameStat = _gameService.GameStatistics();
 }