kurasa
kurasa

Reputation: 5323

'Code First From Database' Template not showing in Visual Studio Entity Data Model Wizard

according to Microsft in this article is should see an option 'Code First From Database' when adding a new item to the project under 'ADO.NET Entity Data Model' in step 3.

I see the following only enter image description here

I have installed EF 6.1 using nuget, I am using Visual Studio 2012 Ultimate..What am i missing?

Upvotes: 55

Views: 23331

Answers (6)

drizin
drizin

Reputation: 1955

You should check out this EntityFramework Reverse POCO Code First Generator project which consists of T4 templates to do Code First from an Existing Database.

Those templates are very easy to use, fully customizable, and are much more complete than the original EF wizard.

Strongly recommend it.

Upvotes: -1

Jose David
Jose David

Reputation: 11

Probably my response is too late! but for others "internautas" probably it works!... In my case the problem was the .NET Framework version, if you create an application and you use a .NET framework is less or equal 3.5 you don't see the option, but if you use 4 or 4.5 the option is visible

Cheers from El Salvador, Central America.

Upvotes: 1

Saad
Saad

Reputation: 374

Try to Update the Visual studio or to download EF tools.

Upvotes: -3

Ziai
Ziai

Reputation: 39

tl;dr
Solution: Download EF6.1.3 updated version from MS download page

enter image description here

In detail
I found all of the previous answers leading towards a solutions, but desipe others claiming to have successfully fixed and issue - I wasn't feeling the same.

But reinstalling eftools.msi got me thinking - why would I reinstall what's already installed when I know that I'm still missing "code first" option. and so I got myself fresh install from microsoft downloads page which for today offers 6.1.3 version.

Success! And it's time to return to EntityFramework tutorial :)

Upvotes: 0

Ming
Ming

Reputation: 111

  1. Install "Entity Framework Power Tools Beta 4" (Tools -> Extensions and Updates)
  2. Right click project, select "Entity Framework", and "Reverse Engineer Code First"

Upvotes: 11

kurasa
kurasa

Reputation: 5323

It turns out that to enable the "Code First From Database" template, you need to download and install the EF Tools.

Upvotes: 76

Related Questions