public override IEnumerable <TResult> Query <TResult>(QueryModel queryModel, StateManager stateManager) { Check.NotNull(queryModel, "queryModel"); Check.NotNull(stateManager, "stateManager"); var queryExecutor = new QueryModelVisitor().CreateQueryExecutor <TResult>(queryModel); var queryContext = new InMemoryQueryContext(Model, Logger, stateManager, _database.Value); return(queryExecutor(queryContext)); }
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)); }