2
Answers

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

Seshu B

Seshu B

7y
13k
1
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)