LINQ Query for Column Headers
I am working on a Silverlight application using a WCF service where I need to get all the Column Headers from a specific table. I have been trying to write a LINQ query to do this, but so far I have not been able to get it to work correctly.
Jaganathan BantheswaranPosted Jun 29, 2011, 6:33 AM
If you mean Linq-Sql then ttry this,
var db = new DataContex();
var columnNames = db.Mapping.MappingSource
.GetModel(typeof(DataContex))
.GetMetaType(typeof(_tablename))
.DataMembers;
Else,
Elaborate the question.