Hello,
I have a simple Linq query below:
var seq = (from n in GetObjects()
select n.SomeKey)
.Distinct()
.Count();
This query works find with SQL Server 2005 and above.
But, this start to give headache when I hooked the EF to SQL Server 2000. Because EF is using APPLY operator which only SQL Server 2005 and above can be supported. I do not know why the hell EF is using APPLy operator instead of sub queries.
My current work around is:
var seq = (from n in GetObjects()
select n.SomeKey)
.Distinct()
.ToList()
.Count();
But, I can forsee more problems to come. The above query is just a simple one.
Did anyone come across such issue? And how you guys work around it? Or is there a way to force EF not to use APPLY operator?
Any help will be very much appreciated.
How Lun.