Converting from Linq-to-SQL to Entity Framework Model First

Recently I switched hosting providers and had to update an existing project to work against a MySQL database instead of SQL Server. After successfully creating the MySQL database and porting over all the data (which turned out to be a major chore and worthy of a post in itself…), I went to update my website to target the MySQL database only to find out (having forgotten completely) that I’d used Linq-to-SQL (L2S) as the ERM and, of course, L2S only supports SQL Server (thanks Microsoft!). So began what I thought would be a painful process of migrating to Entity Framework…

Which actually turned out to be rather easy! If you’re needing to do the same thing, here’s the process I followed and some pointers/things to remember:

(more…)

Continue ReadingConverting from Linq-to-SQL to Entity Framework Model First