Esempio n. 1
0
        public override IEnumerable <TResult> Query <TResult>(QueryModel queryModel, StateManager stateManager)
        {
            Check.NotNull(queryModel, "queryModel");
            Check.NotNull(stateManager, "stateManager");

            var queryCompilationContext = new InMemoryQueryCompilationContext(Model);
            var queryExecutor           = queryCompilationContext.CreateQueryModelVisitor().CreateQueryExecutor <TResult>(queryModel);
            var queryContext            = new InMemoryQueryContext(Model, Logger, stateManager, _database.Value);

            return(queryExecutor(queryContext));
        }
Esempio n. 2
0
        public override IEnumerable <TResult> Query <TResult>(QueryModel queryModel)
        {
            Check.NotNull(queryModel, "queryModel");

            var queryCompilationContext
                = new InMemoryQueryCompilationContext(
                      Model,
                      Logger,
                      EntityKeyFactorySource,
                      _database.Value);

            var queryExecutor = queryCompilationContext.CreateQueryModelVisitor().CreateQueryExecutor <TResult>(queryModel);
            var queryContext  = new InMemoryQueryContext(Logger, CreateQueryBuffer());

            return(queryExecutor(queryContext));
        }