I wish to get a list of columns names, types and whether the column is a PK of a table object in Entity Framework.
How do I do this in C# (4.0) (ideally generically)
if you want only column names then ,i got the best answer : var properties = (from t in typeof(YourTableName).GetProperties() select t.Name).ToList(); var name= properties[0];
var properties = (from t in typeof(YourTableName).GetProperties() select t.Name).ToList(); var name= properties[0];