the "long answer" is a lot of unpleasant expression code: you need to create an expression tree for your query from scratch, because the compiler does this only if everything is strongly typed. However, if you just want to get all the lines, just write
var test = db.GetTable(queryType).Cast<object>();
because the ITable interface is already IEnumerable. Now you still need to understand the sequence of untyped objects.
Can you tell us what you want to do and why?
source share