Is there a way to use Meta Tales or Table names to Construct a dynamic query in LINQ?
foreach (var metaTable in db.Mapping.GetTables())
var queryType = metaTable.RowType.Type;
var test = from q in db.GetTable(queryType)
The "long answer" is a lot of nasty expression code: You have to build up the expression tree for your query from scratch because the compiler only does it if everything is strongly typed. However if you just want to get all rows, just write
var test = db.GetTable(queryType).Cast<object>();
because the ITable interface is already IEnumerable. Now you still need to make sense of a sequence of untyped objects.
Can you tell us what you want to do and why?