我有一个 sql 查询。请有人帮我把它转换成 LINQ。
select * from ProductOrder where OrderId != (Select OrderId from OrderEvents) and MemberId=2
我写了这段代码。但 tis 不起作用。请帮我。
from order in db.ProductOrder
from cancel in db.OrderEvents
where order.MemberId == MemberId
where order.OrderId != cancel.OrderId
//orderby order.OrderId descending
select order