I also would want to say that the following problem was solved by revision
863:
from c in db.Customers
select new { c.CustomerID, HasUSAOrders = c.Orders.Count(o => o.ShipCountry
== "USA") }
before the commit it was translated to sql as:
SELECT c$.[CustomerID], SELECT COUNT(*)
FROM [dbo].[Orders] o$
WHERE c$.[CustomerID] = o$.[CustomerID] AND o$.[ShipCountry] = 'USA'
FROM [dbo].[Customers] c$
It failed because parentheses were needed
After the commit, the query is translated as:
SELECT c$.[CustomerID], (SELECT COUNT(*)
FROM [dbo].[Orders] o$
WHERE c$.[CustomerID] = o$.[CustomerID] AND o$.[ShipCountry] = 'USA')
FROM [dbo].[Customers] c$
A set of test with this problem can be found in Read_AnyCount.cs file in
test projects.
Regards.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"DbLinq" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/dblinq?hl=en
-~----------~----~----~----~------~----~------~--~---