Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1005
IQueryable & [GridDataSourceAction]
posted

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?

Parents
No Data
Reply
  • 17590
    Offline posted

    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.

Children