RG-*_*G-3 3 c# linq asp.net linq-to-sql
我有两张桌子:
PlanMaster(PlanName,Product_ID)
和
ProductPoints(Entity_ID,Product_ID,Comm1,Comm2)
现在我将Entity_ID存储到一个存储在'int'中的Session中:
int getEntity = Int16.Parse(Session["EntitySelected"].ToString());
Run Code Online (Sandbox Code Playgroud)
我想在我的LINQ查询中显示上面表格中的所有项目
Entity_ID = getEntity
这是我的LINQ查询:
var td = from s in cv.Entity_Product_Points join r in dt.PlanMasters on s.Product_ID equals r.Product_ID
where s.Entity_ID = getEntity
select s;
Run Code Online (Sandbox Code Playgroud)
现在它给我一个错误,上面写着:
无法隐式转换类型'int?' 'bool'
这里出了什么问题?感谢您提前的意见!
var td =
from s in cv.Entity_Product_Points
join r in dt.PlanMasters on s.Product_ID equals r.Product_ID
where s.Entity_ID == getEntity
select s;
Run Code Online (Sandbox Code Playgroud)
= 不等于 ==
| 归档时间: |
|
| 查看次数: |
41685 次 |
| 最近记录: |