When working with Entity Framework and DBSets, I'm forced to use ToList() in my [GridDataSourceAction] decorated controller to stop infragistics.lob.js from giving me an Error 500.
This is impractical when working with large datasets, I don't want all the data returned to IIS from the database for querying, I want the query passed right through to the database server.
Is there some reason why IQueryable direct on the dbContext's DBSet does not work? Is it somehow related to the DBContext not be available when the grid needs it?
Hello Dr Tone,
Thank you for posting in our community.
Generally, in case that the returned result is IQuerable everything should behave as expected with no exceptions being thrown. In order to investigate this matter further could you please inspect what is the response from the remote request. In the developers console of the browser, in the Network tab the whole exception message should be displayed. Providing me this message is going to be highly appreciated and could help me in finding the root cause of this issue.
Looking forward to hearing from you.
I had to enable multipleactiveresultsets on the SQL Server connection as I was getting a multiple datareaders error.
Fiddler helped me find the underlying problem.