Weird ADO.NET Entity Framework behaviour

by Pascal Parent 17. April 2009 13:53

I started my project using a Microsoft SQL 2008 server and the ADO.NET Entity Framework only to find out that the host does not support Microsoft SQL 2008 server but only supports Microsoft SQL 2005 server.

Generally, I would just port the database and change the connection string… Which is what I did!

EF was not happy about that because EF still thought it was a SQL 2008 server and built it’s T-SQL accordingly, which failed because it used new commands. This was fine with me, until I realised to my surprise that I could not find any settings to change EF’s SQL version, I searched the code, the config files,...

A Google search did not return any valuable information either.

Though I found a solution, whether or not it is the best. Refresh the mapping file, rebuild the project and voila everything works again.

I find it odd though, I wander what would happen if I had switched to MySQL or Oracle.

Tags: , ,

ASP.NET | Database

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2010 The ASP.NET Guy