Exemple #1
0
 private IQueryable <Game> SelectUserCustomGameHistory(GetUserGameStoryQuery request)
 {
     return(from tags in context.GameTags
            where tags.UserId.Equals(request.UserId) &&
            tags.Tags.Equals(GameTags.CustomLevelsHistory)
            join creation in context.Games on tags.GameId equals creation.GameId
            select creation);
 }
Exemple #2
0
        public Task <List <LevelInfo> > Handle(GetUserGameStoryQuery request, CancellationToken cancellationToken = default)
        {
            IQueryable <Game> userHistoryGames = SelectUserCustomGameHistory(request);

            IQueryable <GameLevel> userHistoryLevels = SelectLevelsInGame(userHistoryGames);

            IQueryable <LevelInfo> levelInfos = SelectLevelInfos(userHistoryLevels);

            return(levelInfos.ToListAsync(cancellationToken: cancellationToken));
        }