How to start working with EF 6 on VS 2012

2013/10/21

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.

IMG_2180

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)

Good luck


Shout it

Add comment
facebook linkedin twitter email

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

*

4 comments

  1. Brandi2013/12/15 ב 12:47

    Good piece! I learned a ton!

    Reply
  2. chanel handbags2013/12/16 ב 14:55

    Also comes with working headlights, rubber tires and a highly detailed exterior/interior.

    Reply
  3. HaiUber2016/05/28 ב 12:49

    Thanks a lot. You’ve just saved my day !!!

    Reply
    1. Bnaya Eshet
      Bnaya Eshet2016/08/02 ב 08:41

      Sorry but not any time soon

      Reply