Upgrading from EF4.1 to EF5, Best approach?

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Post Reply
EdB
Posts: 91
Joined: Mon 15 Oct 2012 09:24

Upgrading from EF4.1 to EF5, Best approach?

Post by EdB » Wed 30 Apr 2014 15:41

Hi,

I need to upgrade my EF4.1 ASP.NET MVC3 .NET4.5 web application to use EF5 due to the performance gains. What is the best approach. I currently generate POCOS via the template. My initial thought is to change the version of EF in model settings to version 5 and then regenerate the code, then regen Web application and all will be well....

Thoughts appreciated.

Thanks,

Edward

P.s I have noticed that that upgrading to .NET4.5 from .NET4.0 causes issues with the data annotations which I believe is due to this functionality moving to .NET from EF or the other way round. ie :

Error 3 'CompareAttribute' is an ambiguous reference between 'System.ComponentModel.DataAnnotations.CompareAttribute' and 'System.Web.Mvc.CompareAttribute' D:\Projects\MyApp\Areas\MySecurityApp\Models\ChangePasswordViewModel.cs 21 10 MyApp

EdB
Posts: 91
Joined: Mon 15 Oct 2012 09:24

Re: Upgrading from EF4.1 to EF5, Best approach?

Post by EdB » Wed 30 Apr 2014 15:44

Fixed Compare bit with:

[System.ComponentModel.DataAnnotations.Compare("Password", ErrorMessage = "Your password and confirmation password do not match.")]

Post Reply