【发布时间】:2013-01-25 11:13:25
【问题描述】:
我正在尝试使用 linq 的 ExecuteStoreQuery 这样的方法从表中删除多行
string query = "delete from IMPORTStatistics where districtid='" + districtId + "'";
db.ExecuteStoreQuery<int>(query);
但是它抛出了这个异常
"The data reader has more than one field. Multiple fields are not valid for EDM primitive types."
我做错了什么?
仅供参考,我使用的是 MySql。
【问题讨论】:
-
Little Bobby Tables 等不及你要发布你的代码了 :)
标签: mysql linq executestorequery