The generated SQL string for the command linq2Entity First <> work properly with SQL Server 2008. The SQL generated is SELECT TOP (1) ...
order to connect to a change in the metadata DB SQLServer2005 serves the property ProviderManifestToken = "2005".
clear at this point the error that gives the title to the post: each call to FirstOrDefault <> or First <> explodes Quote cryptic.
The catch is just the generated SQL: TOP (1) looks stodgy to sql server 2005.
The solution: use as a compatibility layer for the property ProviderManifestToken 2000.
The query generated is a Top ... Without parentheses, and works on SQLServer2005
Q T his post in the forums microsof illustrates a similar problem and solution.
0 comments:
Post a Comment