LINQ to SQL compatibility between different versions of SQL Server

I created my DataClasses, connecting to a SQL Server 2005 database. Do I need to recompile if my application is connected to a SQL Server 2000 database?

SQL Server 2000 does not support ROW_NUMBER () function. I use the Skip () and Take () LINQ to SQL methods to write through my records. Will LINQ to SQL correctly generate the correct SQL query, although it was compiled to connect to a newer version of SQL Server?

+4
source share
1 answer

SQL is selected based on run-time server. Generated IDE code (C #, etc.) Does not depend on version. No, you do not need to do anything to reassign another version of the database.

However, if you try it, some code can not be compared with SQL2000. It is simply impossible (at least, it is convenient or safe) to take some action skip / take / etc without reasonable support database. Some things he can do ... Some things can not. You will need integration - test the application for this platform.

+5
source

All Articles