tags:

views:

14

answers:

1

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.ShipAddress

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

A: 

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 }
Torbjörn Hansson
thanks but i need vb.net code
Suhaibnm
@Suhaibnm Does it work witht he vb.net code i added?
Torbjörn Hansson
no still the same
Suhaibnm
It's say's error "End of Statament Expected"
Suhaibnm
any way I used This below code it's work fine Dim query = From c In cntxtNorthWind.Customers _ Group Join x In cntxtNorthWind.Orders On c.CustomerID Equals x.CustomerID Into xs = Group _ From x In xs.DefaultIfEmpty() _ Select c.CustomerID, x.OrderID, x.EmployeeID
Suhaibnm