How to start working with EF 6 on VS 2012
Entity Framework 6 is finally having a NuGet stable release (version 6.0.1),
but you should be aware that start working which this version will required more than adding NuGet reference.
in order to use Entity Framework 6 (on VS 2012), you have to follow those steps:
- install Entity Framework 6 Tools for Visual Studio 2012
- you may also want to install EF Power Tools but this one is not mandatory
- delete any assembly reference to System.Data.Entity.dll,
EF 6 doesn’t use it and it will collides with it’s types,
make sure that it not added after addition of new edmx (it shouldn’t happens if you installed the Entity Framework 6 Tools for Visual Studio 2012)
- Add NuGet reference to Entity Framework 6
- EF 6 was changing System.Data.? namespace to System.Data.Entity.Core.? namespace, if you’re using code first you will have to change it manually.
see the this post for more information
- If you have existing model first edmx you will have to delete it and create it again (an alternative is to fix the xml and T4 template)