I'm working with dynamic queries using LINQ on Entity Framework.
To query some tables by user input filters, we are using PredicateBuilder
to create conditional WHERE sections. That works really great, but the number of columns returned are fixed.
Now, if we need the user to select which columns he needs in their report, besides their filters, we are in trouble, as we don't know how to do dynamic myQuery.Select( x => new { ... })
as we do for Where clause.
How can we achieve something like this?