给定两个表,即客户和订单,如何对实体进行linq查询以查找在特定日期之前开立的未结发票的客户?
答案 0 :(得分:1)
VB.net
Dim query = _
From customer In customers _
From order In orders _
Where customer.CustomerID = order.Customer.CustomerID _
And order.OrderDate <= dtOrderDate _
And order.IsOpen = True _
Select New With _
{ _
CustomerID = customer.CustomerID, _
OrderID = order.SalesOrderID, _
Total = order.TotalDue _
}
中的代码
那里到达那里