File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ public QueryableExecutionModel GetExecutionModel(Expression expression)
105105 return Translate ( expression ) . Model ;
106106 }
107107
108- private object ExecuteModel ( QueryableExecutionModel model )
108+ internal object ExecuteModel ( QueryableExecutionModel model )
109109 {
110110 return model . Execute ( _collection , _options ) ;
111111 }
Original file line number Diff line number Diff line change @@ -73,7 +73,9 @@ public QueryableExecutionModel GetExecutionModel()
7373
7474 public IAsyncCursor < TOutput > ToCursor ( CancellationToken cancellationToken )
7575 {
76- return _queryProvider . ExecuteAsync < IAsyncCursor < TOutput > > ( _expression , cancellationToken ) . GetAwaiter ( ) . GetResult ( ) ;
76+ var model = _queryProvider . GetExecutionModel ( _expression ) ;
77+ var mongoQueryProvider = ( MongoQueryProviderImpl < TInput > ) _queryProvider ;
78+ return ( IAsyncCursor < TOutput > ) mongoQueryProvider . ExecuteModel ( model ) ;
7779 }
7880
7981 public Task < IAsyncCursor < TOutput > > ToCursorAsync ( CancellationToken cancellationToken )
You can’t perform that action at this time.
0 commit comments