public override IAsyncEnumerable <TResult> AsyncQuery <TResult>(QueryModel queryModel, StateManager stateManager)
        {
            Check.NotNull(queryModel, "queryModel");
            Check.NotNull(stateManager, "stateManager");

            var queryCompilationContext
                = CreateQueryCompilationContext(
                      new AsyncLinqOperatorProvider(),
                      new RelationalResultOperatorHandler(new AsyncResultOperatorHandler()),
                      new AsyncQueryMethodProvider());

            var queryExecutor = queryCompilationContext.CreateQueryModelVisitor().CreateAsyncQueryExecutor <TResult>(queryModel);
            var queryContext  = new RelationalQueryContext(Model, Logger, stateManager, _connection, ValueReaderFactory);

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

            var queryCompilationContext
                = CreateQueryCompilationContext(
                      new LinqOperatorProvider(),
                      new RelationalResultOperatorHandler(),
                      new QueryMethodProvider());

            var queryExecutor = queryCompilationContext.CreateQueryModelVisitor().CreateQueryExecutor <TResult>(queryModel);

            var queryContext
                = new RelationalQueryContext(
                      Logger,
                      CreateQueryBuffer(),
                      StateManager,
                      _connection,
                      ValueReaderFactory);

            return(queryExecutor(queryContext));
        }
Example #3
0
 public Enumerator(RelationalQueryContext queryContext, string sql, IEntityType entityType)
 {
     _queryContext = queryContext;
     _sql          = sql;
     _entityType   = entityType;
 }