Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL Server backward compatibility in Entity Framework?

Is there any backward compatibility in the entity framework between SQL Server 2008 and 2005?

It seems the framework forces you to use the same provider for all the .edmx files in a solution.

If you use the 2008 provider, data types like DateTime2 and functions like SysDateTime that are emitted by the framework to the underlying SQL query make it useless to use them against a SQL 2005 Server.

Any way around this?

like image 235
shake Avatar asked Nov 10 '09 08:11

shake


People also ask

Is SQL Server backwards compatible?

SQL Server Management Studio is backward compatible and it is always recommended to use the latest version even if you are connecting to older versions of SQL Server such as SQL Server 2008.

Is SQL Server 2019 backward compatible?

SQL Server 2019 is backwards compatible for the below SQL Server versions: SQL Server 2019 (150) SQL Server 2017 (140) SQL Server 2016 (130)

Does Entity Framework only work with SQL Server?

No. Entity Framework is a device that adapts between C# LINQ statements, and various flavors of SQL in order to download database data and transform it into a tree of bjects you can work with in C#.

Is SQL Server forward compatible?

Yes, SQL Server 2017 has a forward compatibility with backups created in SQL Server 2008R2. The restore process restores all user and system objects and then perform an upgrade of them to a current version.


1 Answers

Did you set the ProviderManifestToken in the EDMX to 2005? If you intend to support 2005, you should. If you design your EDMX using a 2008 server, the GUI designer will optimize the model for 2008, including data types and query syntax. If you design your EDMX against a 2005 server, only 2005-compatible types will be used, and the ProviderManifestToken will be set to 2005.

like image 54
Craig Stuntz Avatar answered Oct 03 '22 15:10

Craig Stuntz