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