【发布时间】:2012-04-16 16:33:59
【问题描述】:
我正在尝试从 Customer 表中获取 customerId。
但是,当我尝试制作它时,它有错误说,'无法将类型'System.Linq.Iqueryable'隐式转换为'int''
如何获取 customerId??
谢谢。
这是我的代码。
int customerId = from a in db.Customer
where a.userName == customerName
select a.customerId;
//it has error in here.
order.customerId = customerId;
【问题讨论】:
标签: asp.net-mvc-3 linq