I need to get table data from table name from Linq DataContext.
Instead of this
var results = db.Authors;
I need to do something li
Given DataContext context and string tableName, you can just say:
DataContext context
string tableName
var table = (ITable)context.GetType() .GetProperty(tableName) .GetValue(context, null);