Where are Entity Framework Tools in EF6 and Visual Studio 2017?

不羁的心 提交于 2020-05-14 14:48:10

问题


I'm using Visual Studio 2017 and Entity Framework 6, and for the life of me, I cannot find the EDMX file, Entity Data Tools, Model Browser, or Entity Designer...

Am I losing my mind here? I've created multiple new projects trying to find these UI-based tools for working with the Entity Framework data models and can't seem to get anywhere.

Please help!

I believe I have the correct tools installed in the VS2017 Install:


回答1:


For anyone looking at this, in my case the answer was that I was using a Code-First implementation of the Entity Framework, which apparently does NOT give you access to the Visual Tools.

So there is no EDMX file in Code-First Entity Framework.




回答2:


At the installation of VS2017 you had to go to Individual Components to install those tools, don't think they are installed by default.

  • Individual Components
    • SDK, Libraries and Components

You can run this install from the VS Installer

Entity Framework not appearing in Add New Item list in Visual Studio 2017




回答3:


I had similar issue. I reinstalled Entity Framework 6 tools without luck, even reinstalled SQL tools (sorry, forgot exact name). But solution was very simple:

right-click the edmx file-> choose Open with->choose ADO.NET Entity Data Model Designer




回答4:


Please also see the current documentation. They state that for current Visual Studio versions, the tools will be included. For previous versions, separate installers (MSI packages, not extensions) are available for download at the Microsoft Download Center. F.e., see Visual Studio Releases > Visual Studio 2013, which will tell you where to find the MSI for Visual Studio 2013.

As in response to gotmike's accepted answer, today there's an 3rd party marketplace extension called Entity Framework Visual Editor, which can be used (I didn't try it myself) to generate a visual representation out of the code first model/POCO classes.

Also note that the Entity Framework Power Tools always had the feature to preview code first entities in a designer view called "View Entity Data Model (Read-only)". This option appears in your context menu when you select a model class derived from DbContext.



来源:https://stackoverflow.com/questions/43920397/where-are-entity-framework-tools-in-ef6-and-visual-studio-2017

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!