I have a program that is accessing many similar tables using a linq to sql datacontext. Do linq to sql tables implement a common interface? I would like to write methods that could work with any of the similar tables, so it would be great to do something like
Dim myTable as ILinqDataTable
If switch = "TableA" then myTable=myDataContext.TableA Else myTable=myDataContext.TableB
Is this possible with LINQ to SQL?
Update
Dim datasource as IlinqDatatable // new interface that I implemented based on John's suggestion
Dim rec = From l in datasource where l.exported=false select l //raises "Late binding operations cannot be converted to an expression tree."