开发者

Dynamic table name linq-to-sql dynamic LINQ

开发者 https://www.devze.com 2023-01-15 04:03 出处:网络
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.

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 u开发者_如何学编程sing dynamic LINQ. Would someone provide an example of similar scenario with dynamic LINQ?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消