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
精彩评论