I have the following query
Dim query As IEnumerable(Of IEnumerable(Of DataRow)) =
(From veh In Vehicles.AsEnumerable
Group Join auctioned In ActiveAuctionedVehicles.AsEnumerable
On veh.Field(Of Decimal)("VehicleId") Equals auctioned.Field(Of String)("VehicleId")
Into Group
Let auctioned = Group.FirstOrDefault
Where auctioned IsNot Nothing AndAlso auctioned.Field(Of String)("Bundle") = bundle
Select Group)
Where Vehicles and ActiveAuctionedVehicles are DataTables.
If i Select Group
or Select veh, auctioned
the result is IEnumerable(Of IEnumerable(Of DataRow)).
On the other hand, selecting only one of the veh, auctioned returns IEnumerable(Of DataRow)
In the first case the first enumerable contains only one record, which by turn contains the datarow.
Why is this happening?