开发者

how to write conditional query from two tables using LINQ

There are two tables in tw开发者_运维技巧o database Promotion: code, source, broker BrokerNo: Id, Name, BrokerNo What I want to query are all BrokerNo.Name records satisfying the condition of Promotion.broker=BrokerNo.BrokerNo and Promotion.source="asdf" How to write the query statement using LINQ?


from promotion in Promotion
from brokerNo in BrokerNo
where promotion.source == "asdf" && promotion.broker == brokerNo.BrokerNo
select brokerNo.Name
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜