【发布时间】:2015-09-03 16:47:47
【问题描述】:
我需要从我只知道名称的表中获取列名和值。 我尝试了很多东西,但都没有成功。
我用这个来拿我的桌子:
var table = oSession.ctx.GetType()
.GetProperty("country")
.GetValue(oSession.ctx, null);
我被锁定了,我无法检索我的列的信息.. 也许我已经尝试过了:
List<string> columnsNames = table.GetType().GetFields().Select(field => field.Name).ToList();
感谢您的帮助..
【问题讨论】:
标签: c# entity-framework reflection dataset