示例#1
0
 private static IQueryable <GameDataTransferObject> QueryGames(TicTacToeContext context)
 {
     return(context.Games
            .Include(gameDTO => gameDTO.History)
            .ThenInclude(history => history.Turns)
            .Include(gameDTO => gameDTO.Board)
            .Include(gameDTO => gameDTO.TicPlayer)
            .Include(gameDTO => gameDTO.TacPlayer));
 }
示例#2
0
 public UserAPI(TicTacToeContext context, IMapper mapper)
 {
     gameRepository = new GameDbRepository(context, mapper);
 }
示例#3
0
 private static IQueryable <UserDataTransferObject> QueryUsers(TicTacToeContext context)
 {
     return(context.Users);
 }
示例#4
0
 public GameDbRepository(TicTacToeContext context, IMapper mapper)
 {
     this.mapper  = mapper;
     this.context = context;
 }