How to find dbcontext template in Visual Studio 11

I use the first database approach to create a model with an entity. In VS2010, after creating the model, I always select a different code generation template (right-click on the “Add a new code generation element” diagram), then select “DbContext Generator” in the dialog box. This will instruct VS to generate POCO classes instead of the very complex standard class. When I tried to do the same in Visual Studio 11 Developer Preview, I could not find the "DbContext Generator" template in the dialog box. How to add dbcontext template in Visual Studio 11 Developer Preview? I saw that I can use nuget, but I cannot find it when I search.

+4
source share
2 answers

In February, Microsoft released the dbContext Generator, which runs on Visual Studio 11 Beta. Link to download this generator:

http://visualstudiogallery.msdn.microsoft.com/da740968-02f9-42a9-9ee4-1a9a06d896a2?SRC=VSIDE

Hope this helps.

0
source

Can you add Entity Framework Power Tools through the extension manager? Then in the class library you can right-click and "Engineer Reverse Code First". This will bring up your database and create everything you need (no need for EDMX and TT files). You will need to install EF 4.1 or add the EntityFramework NuGet package to your project before starting the reverse engineer.

I do not have VS 11 installed here, so I can’t check if the tools will be installed (I’m also not sure that these functions are turned over to 11), but it will work fine anyway in 2010, as I often use it.

Richard

+2
source

Source: https://habr.com/ru/post/1389759/


All Articles