简体   繁体   English

创建第二个EDMX文件永远不会运行实体数据模型向导

[英]Creating a second EDMX file never runs the Entity Data Model Wizard

I am trying to add a second connection in my project, and I went through the steps: got the connection string, confirmed I could access it, planned the location in the solution. 我正在尝试在我的项目中添加第二个连接,然后我完成了以下步骤:获取连接字符串,确认我可以访问它,计划解决方案中的位置。

I did an Add .. New .. Data .. Entity Framework 6.x dbContext Generator The hour glass ran for a minute, then it returned to the solution without any information collection and no EDMX record was created. 我做了一个Add .. New .. Data .. Entity Framework 6.x dbContext Generator小时玻璃运行一分钟,然后它返回到没有任何信息收集的解决方案,并且没有创建EDMX记录。 It created all of the files that would normally go under the edmx file though. 它创建了通常在edmx文件下的所有文件。 Including the file that has a pointer name back to the edmx file. 将包含指针名称的文件包含在edmx文件中。

This is in Visual Studio 2015. I also removed and reinstalled Entity Framework and tried using EF 5.x instead of 6.x in two separate projects with no EF in the main project. 这是在Visual Studio 2015中。我还删除并重新安装了Entity Framework,并尝试在主项目中没有EF的两个单独项目中使用EF 5.x而不是6.x. No change in behaviour. 行为没有变化。

So does anyone know what could cause this and how to get around it so that I can get this last step completed? 那么有谁知道是什么原因导致这种情况以及如何绕过它以便我可以完成最后一步?

Thanks, Michael 谢谢,迈克尔

When I first created my edmx file I am positive that I selected the EF 6.x DbContext Generator. 当我第一次创建我的edmx文件时,我很肯定我选择了EF 6.x DbContext Generator。 Which stopped working for me after that. 那之后停止为我工作。

What I found to make it consistently work was I have to create a New .. Data .. ADO.NET Entity Data Model and that will generate the POCO I need. 我发现它始终如一地工作是我必须创建一个新的...数据.. ADO.NET实体数据模型,这将生成我需要的POCO。 I have not experimented with how well it works with two EDMX files in one project! 我没有尝试在一个项目中使用两个EDMX文件的效果如何!

But his has me working once again. 但他让我再次工作。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM