LINQ-to-SQL dynamic table name LINQ-to-SQL

dynamic-linq linq-to-sql

Question

I want to construct my query dynamically based on the contents user has selected, and I want to do this in LINQ-t0-SQL. I have seen this, but I don't want to use SQL statements with datacontext.

On Googling a bit I have a feeling that this can be done using dynamic LINQ. Would someone provide an example of similar scenario with dynamic LINQ?

1
1
5/6/2018 12:53:08 PM

Popular Answer

Looks like this is the link you need.
Update. Some details: you can use the SearchType method from the post to obtain a type using the table name and then use Dynamic LINQ to write queries you like.

3
9/13/2010 10:34:26 AM


Related Questions





Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow