0

I am trying to page a large set of data using IQueryable. Take method for a query that I am building dynamically. I was going to use the take method so I can keep taking until I have read the entire large dataset. Basically, I am reading the data in chucks to increase performance.

I am trying to allow a user via a few drop downs. Build a connectionstring to the database (database and table can change) and I want to be able to then take the table that is selected by the user and perform a select clause. Not knowing which table or elements are available during run time the select and from section will have to be dynamic.

I am not sure if this is possible with the Linq but does anyone have a idea on how I can solve this?

Mohit Kanwar
  • 2,962
  • 7
  • 39
  • 59
Paul
  • 53
  • 1
  • 7
  • The connection string is a parameter to the context's constructor, adding helpers to enumerate the tables and populate the next part of the UI are clear first steps: [SO] is not a code writing service please show what you have achieved. – Richard Jul 30 '15 at 05:44
  • Not asking for code. Asking for guidance. Please re-read the question. As LINQ does not allow me to have a dynamic select and from clause. – Paul Jul 30 '15 at 05:50
  • You certainly can have dynamic select etc. The LINQ operators for `IQueryable` take expression trees: these have an API that allows them to be built at runtime. – Richard Jul 30 '15 at 06:10

0 Answers0