Reputation: 438
I have an EF context using linq that is being executed on multiple sql servers of varying types. What I have found is that linq is causing a syntax error on a sql server 2000 box because the linq translation for .FirstOrDefault()
is being translated into sql that uses SELECT TOP (1)
instead of SELECT TOP 1
and it would seem that the parenthesis are causing this syntax error as they are not supported in this context in sql server 2000.
Is it possible to force linq to use SELECT TOP 1
instead of SELECT TOP (1)
?
Upvotes: 3
Views: 632