entity framework - What tools are there that help build expression trees for dynamic LINQ queries? -


my project needs let users build own dynamic queries. i've read, expression trees way go. syntax rather complicated.

i envision having gui users able check tables, select columns, specify parameters,etc , build string such as:

            var myquery =                 p in context.projects                 join ua in context.userattributes on p.projectid equals ua.projectid                 join uba in context.userbooleanattributes on ua.userattributeid equals uba.userattributeid                 join u in context.users on uba.userid equals u.userid                 p.projectid == 1                 uba.value == true                 (ua.userattributeid == 1 || ua.userattributeid == 2)                 select new { uba = u }; 

and store in queries table. process query, hoping there library out there magically like:

var result = magic(str); foreach(var user in result)    foo(user.email); 

in example know queries return users, other queries have use reflection or in column specify expected type in results.

i found 1 project called linqtextquerybuilder looks interesting, wanted see if there other alternatives.


Comments