Questions tagged [iqueryprovider]

9 questions
7
votes
1 answer

How to make LINQ-to-Objects handle projections?

I have implemented a basic (naive?) LINQ provider that works ok for my purposes, but there's a number of quirks I'd like to address, but I'm not sure how. For example: // performing projection with Linq-to-Objects, since Linq-to-Sage won't handle…
Mathieu Guindon
  • 69,817
  • 8
  • 107
  • 235
1
vote
1 answer

Get IQueryProvider from DbContext

I'm trying to write a query provider that instantiates a DbContext before execution, executes the query and then immediately disposes the generated context object. For this I have to implement IQueryProvider.Execute(....). Inside of this method i…
wertzui
  • 5,148
  • 3
  • 31
  • 51
1
vote
0 answers

ASP.NET OData with custom IQueryable and IQueryProvider

I am trying to apply additional server-side filtering to entities exposed by an asp.net OData service, using Linq to Entities. So far so good, but the Linq query that I build for the filter can sometimes get to an enormous length, causing a…
1
vote
1 answer

Compiler error when constructing Linq.EnumerableQuery in implementation of IQueryProvider

I have an implementation of IQueryProvider and have the following method: public override IQueryable CreateQuery(System.Linq.Expressions.Expression expression) { return new System.Linq.EnumerableQuery(this.Items); } The…
Fiona - myaccessible.website
  • 14,481
  • 16
  • 82
  • 117
0
votes
1 answer

HibernateCursorItemReader and EntityGraph

I need to use HibernateCursorItemReader in a Job due to size of the Resultset, but I can't make it work with an EntityGraph to fetch some relationships eagerly. I'm using QueryProvider. Without any EntityGraph no join occurs, and the reader works…
smaudi
  • 83
  • 7
0
votes
0 answers

ArgumentNullException in custom IQueryProvider

At first some background for understanding why I try to create a custom IQueryProvider: I'm looking for a solution for a generic OData client that supports IQueryable. I don't want to use the OData client code generator (because I do not want to…
0
votes
0 answers

WebApi OData service with other OData serivce as source

I have existing internal OData service. The goal is to create new service for external users. I tried to create IQueryable using odata client and then expose it using WebApi with filter added. //autogenerated by T4 from odata client public partial…
0
votes
1 answer

Intercepting and overriding a comparison expression in an object that otherwise delegates to Linq to Objects provider

The goal here is to get some WCF Data Services query scenarios accurately reflected in code under test. Following the same pattern for mocking EF functionality detailed here, I'm mocking a DataServiceQuery wrapper class and delegating to the…
moarboilerplate
  • 1,633
  • 9
  • 23
0
votes
1 answer

Call to a member function query() on a non-object in line 25

I'm getting this PHP Fatal Error: Fatal error: Call to a member function query() on a non-object in C:\xampp\htdocs\University\createTables.php on line 25 createTables.php