开发者

Linq to sql - left outer Join

hI..!

Dim query = From c In cntxtNorthWind.Customers _
Join x In cntxtNorthWind.Orders On c.CustomerID Equals x.CustomerID into sr _
from b in sr.DefaultifEmpty() _
Select c.CustomerID, x.OrderID, x.ShipAddr开发者_运维问答ess

Above Outer Left Join cannot execute it's says "End of Statament Expected"


You need to select an object. Easiest way to return an anonymous object. (Not sure how to type in VB.net but i c# it's):

...
select new { c.CustomerID, x.OrderID, x.ShipAddress };

Believe it's like this i VB.net:

...
select New With { c.CustomerID, x.OrderID, x.ShipAddress }
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜