i want to display column names by passing table name in mvc using entity frame work
please give me solution regarding this .
Thanks
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Dharmraj ThakurRank #577 · 4.2K reputationPosted Jun 2, 2017, 12:57 AM EDT
var names = typeof(User).GetProperties().Select(property => property.Name).ToArray();Seshu BRank #3,253 · 440 reputationPosted Jun 2, 2017, 1:24 AM EDT
var names = typeof(User).GetProperties().Select(property => property.Name).ToArray();{
using (var Context = new MCPEntities())
{
var names = typeof(tablename).GetProperties().Select(property => property.Name).ToArray();
return names.ToList();
}
}
Dharmraj ThakurRank #577 · 4.2K reputationPosted Jun 2, 2017, 2:06 AM EDT
Select().Where(property => property.Name = "table1")
Seshu BRank #3,253 · 440 reputationPosted Jun 2, 2017, 4:20 AM EDT
var names = typeof(User).GetProperties().Select(property => property.Name).ToArray();