LINQ: Get Table Column Names
The below code will worked from returns all the column names of the table
var columnnames = from t in typeof(table_name).GetProperties() select t.Name
Maybe It is too late but, I solved this problem by this code
var db = new DataContex();
var columnNames = db.Mapping.MappingSource
.GetModel(typeof(DataContex))
.GetMetaType(typeof(_tablename))
.DataMembers;