【发布时间】:2013-10-08 13:02:58
【问题描述】:
由于我是实体框架和 linq 的新手,所以我对实体框架或 linq 了解不多。目前我正面临An error occurred while executing the command definition. See the inner exception for details. 异常:
foreach (var items in query)
{
var outtime= from x in con.CHECKINOUTs
select x;
}
但如果我在 foreach 循环之外进行查询,它会完美运行。
var outtime= from x in con.CHECKINOUTs
select x;
我需要做的是对于每个查询项,我需要根据超时添加另一个字段。
请建议我该怎么做?以及如何获取有关异常An error occurred while executing the command definition. See the inner exception for details.的更多详细信息
【问题讨论】:
标签: linq entity-framework entity-framework-4.1