I'm working with an application which allows customers to create and import custom tables. I have the need to allow those customers to build dynamic queries against the imported custom tables and I would like to be able to use LINQ to do this.
I'm familiar with how to create Dynamic LINQ queries however all the methods I know of require an existing mapped object on the DataContext object. As users are able to create custom tables at runtime (through dynamic string built SQL) there isn't a mapped object in any DataContext.
Is there a way to dynamically create a DataContext and mapped object at runtime for use with a dynamic Linq query?
Is there some other way to do this without resorting to string built sql?