I have a Data Class called MyTable, and the source property is TABLE (table name in database).
How to retrieve the source property given a Linq<Table>
?
DBDataContext db = new DBDataContext();
db.MyTable.GetSource() ??
I have a Data Class called MyTable, and the source property is TABLE (table name in database).
How to retrieve the source property given a Linq<Table>
?
DBDataContext db = new DBDataContext();
db.MyTable.GetSource() ??
The MyTable data class should have a Table attribute on it. You should be able to do something like this:
var tableType = db.MyTable.GetType().GetGenericArguments().First();
foreach (TableAttribute attrib in tableType.GetCustomAttributes(false))
{
Console.WriteLine(attrib.Name);
}