Hello,
Here is my scenario: We have a legacy system that has about 100 views that all pull the same columns worth of data.
Now, in my DataContext I have all the views in the context and I have a seperate query from each one. Each query's results loads into a single List that gets returned to the application.
Is it possible to have a single query that I can pass in a object to know which table to pull from?
Example:
var query = from GenericTable.Where(whereClause).Select(ObjectMap);
Note: i know this is not the right syntax, it is just for example only.
My main goal is to avoid having to write 100 different queries when they are all the same thing, just pointed to a different view each time.
Any suggestions are welcome, even if it is to keep the 100 queries.
Thanks!