Hi,
With FileInfo I can find the file name of a DataContext .dbml file.
Provided I declare:
Dim DataModel = New AttributeMappingSource().GetModel(GetType(NorthwindDataContext))
With System.Data.LINQ.Mapping I can find the name of all Tables and furthermore their Columns and relationships.
All this thanks to the excellent post from Jomo Fisher here: LINQ to SQL Trick: Get all Table [and Column] Names: http://blogs.msdn.com/jomo_fisher/archive/2007/07/30/linq-to-sql-trick-get-all-table-names.aspx
But how can I achieve same result without explicitly knowing the DataContext Object? I mean how can i "replace" this:
GetType(NorthwindDataContext))
With:
dim myDCFile as String = "Northwind.dbml"
Dim DataModel = .../... GetType(myDCFile))