How to build a dynamic FROM clause for a LINQ query?
I have a standard LINQ query: var list = from x in SomeDataContext.ViewName where //Rest of where clause select x; I would like to know if it is possible to build a dynamic LINQ query so that i can change the SomeDataContext.ViewName at runtime. I have about 5 different views, all with the basic columns needed to perform the where clause, but with some different column names for each of other views. So is it possible to build up the query so that i can use the different context at runtime, when needed? Example: public void SomeMethod() { var listA = GetList("DataContext.ViewA"); var listB =