Seshu B

Seshu B

  • NA
  • 442
  • 145k

How to convert IQueryable to List<string> value in entity

Jun 5 2017 2:58 AM
This is my code

public List<string> GetColumnNames(string tablename)
{
using (var Context = new MCPEntities())
{
PropertyInfo info = Context.GetType().GetProperty(tableName);
IQueryable table = info.GetValue(Context, null) as IQueryable;
return table;
}
}
 
 

Answers (2)