SQL 查询到 linq 语法
我如何将此 join stmnt 转换为 linq 语法
SELECT pv.Product_ID, pv.Product, v.Add_ID, v.Product_ID
FROM Product AS pv
JOIN Product_Add AS v
ON ((pv.Product_ID = v.Add_ID) OR (pv.Product_ID = v.Product_ID))
where(( pv.Product_ID = v.Product_ID) OR (pv.product_ID = v.Add_ID))
谢谢
How can i convert this join stmnt to linq syntax
SELECT pv.Product_ID, pv.Product, v.Add_ID, v.Product_ID
FROM Product AS pv
JOIN Product_Add AS v
ON ((pv.Product_ID = v.Add_ID) OR (pv.Product_ID = v.Product_ID))
where(( pv.Product_ID = v.Product_ID) OR (pv.product_ID = v.Add_ID))
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
除了 Join 之外,您还可以使用 from...where,这是一样的。
(如果您有多个连接,您只需将所有连接条件与其余的 where 进行 AND 操作)
Instead of Join, you can use from...where, it's the same thing.
(You just AND all the join conditions with the rest of the where if you have multiple joins)
我会为你转换这个,
但你最好使用这个工具,它对我将 sql 转换为 linq 代码非常有帮助
http: //www.sqltolinq.com/
只需下载并安装在您的计算机上即可为您工作。
I would convert this for you
but its better you use this tool which is really help full to me to convert sql to linq code
http://www.sqltolinq.com/
just download and install on your machine will do work for you.