简体   繁体   English

Visual Studio 2013中的Entity Framework Power 4工具

[英]Entity Framework Power 4 tools in Visual Studio 2013

I´ve read that one of the best ways to learn Code First with an existing database is to use the EF Power Tools. 我已经读过,使用现有数据库学习“代码优先”的最佳方法之一就是使用EF Power Tools。

I downloaded Entity Framework Power tools beta 4, and installed it in my existing instalation of Visual Studio 2013. After this i restarted Visual Studio. 我下载了Entity Framework Power工具beta 4,并将其安装在现有的Visual Studio 2013安装中。此后,我重新启动了Visual Studio。

I created a class library with my entities. 我用我的实体创建了一个类库。 From what i understand when the plugin is installed i should get a context menu on the project that will allow me to reverse-engineer a database, i can't find this menu. 据我了解,安装插件后,我应该在该项目上获得一个上下文菜单,该菜单将允许我对数据库进行反向工程,但是我找不到此菜单。

Some possible causes of this of this could be: 造成这种情况的一些可能原因可能是:

  • I missed some step of the installation process 我错过了安装过程的某些步骤
  • My classes are inside a folder (namespace in .NET) and somehow not recognized by the tool. 我的类位于文件夹(.NET中的命名空间)内,并且以某种方式无法被工具识别。

Any help would be appreciated! 任何帮助,将不胜感激!

The problem was that Entity Framework Power tools extension was disabled after the installation. 问题是在安装后禁用了Entity Framework Power工具扩展。 In order to fix this, you need to go to: Tools-> Extensions and updates, enable the extension and restart Visual Studio 2013. 为了解决此问题,您需要转到:工具->扩展和更新,启用扩展并重新启动Visual Studio 2013。

The other fact that was confusing me was that in order to see the model that is being created by the code-first approach you need to right click the class containing your context (inherits from DbContext) and look inside the "Entity Framework" submenu for "View Entity Data Model". 另一个令我感到困惑的事实是,为了查看由代码优先方法创建的模型,您需要右键单击包含上下文的类(从DbContext继承),然后在“ Entity Framework”子菜单中查找“查看实体数据模型”。

Hope this helps someone! 希望这对某人有帮助!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用CRM开发人员工具在Visual Studio 2013中生成实体包装时出错 - Error generating Entity Wrapper in Visual Studio 2013 with CRM developer tools Visual Studio 2013 - 实体框架 - 更新向导无响应 - Visual Studio 2013 - Entity Framework - Update Wizard not responding 我无法在VS 2013 Express Desktop Edition上安装Entity Framework Power Tools Beta 4 - I can not install Entity Framework Power Tools Beta 4 on VS 2013 express Desktop Edition 自定义对象上下文实体框架6和Visual Studio 2013 - custom object context entity framework 6 and visual studio 2013 在Visual Studio 2013中使用实体框架无法读取sqlite数据库 - cannot read sqlite database , using entity framework in visual studio 2013 Visual Studio 2013实体框架缺少数据库生成 - Visual Studio 2013 Entity Framework Generate from database missing EF6和Visual Studio 2017中的实体框架工具在哪里? - Where are Entity Framework Tools in EF6 and Visual Studio 2017? Visual Studio 2013:GUI和TFS电动工具命令行之间的注释差异 - Visual studio 2013: Difference in annotations between GUI and TFS power tools command line 无法安装Entity Framework Power Tools - Cannot install Entity Framework Power Tools 在 Microsoft Visual Studio 2013 的 WinForms 中为 MySql (C#) 启用实体框架 6 - Enable Entity Framework 6 for MySql (C#) in WinForms of Microsoft Visual Studio 2013
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM