是否有一个实体框架7数据库,首先POCO发电机? [英] Is there an Entity Framework 7 Database-First POCO Generator?

查看:217
本文介绍了是否有一个实体框架7数据库,首先POCO发电机?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在玩弄实体框架7和ASP.NET 5一个新的项目我的工作,但我已经打了一个路障。我工作的团队使用一个DBA优先的发展方针;也就是说,数据库由DBA的设计,然后开发商改变code,以补偿模型的变化。

I've been playing around with Entity Framework 7 and ASP.NET 5 for a new project I'm working on, but I've hit a road block. The team I'm working on uses a DBA-first approach to development; ie the database is designed by DBA's and then the developers alter the code to compensate for the model changes.

使用EF6,这个效果很好,因为我们可以只更新使用EDMX设计师的更新功能code。一点击,我们得到了新的类,我们就大功告成了。然而,在EF7,一切都不同了。没有更多的设计师,我们应该使用code-首先,它根据一些博客文章在那里由EF团队,也应该支持数据库优先code产生。

Using EF6, this works well, since we can just update the code using the EDMX designer's "update" functionality. One click, we get the new classes, and we're done. However, in EF7, everything is different. There's no more designer, and we're supposed to use Code-First, which according to some blog postings out there by the EF team, should also support "Database-First" code generation.

不过,我无法弄清楚如何与Visual Studio 2015年CTP6在ASP.NET 5应用程序做到这一点。是工具支持到那一步,还是我的运气?并且它甚至未来可言?

However, I'm unable to figure out how to do this with the Visual Studio 2015 CTP6 in an ASP.NET 5 application. Is the tooling support there yet, or am I out of luck? And is it even coming at all?

谢谢!

推荐答案

在最新的比特可以使用DNX命令提示符,PowerShell命令要做到这一点,是

In the latest bits it is possible to use the dnx command prompt and powershell commands to do this, yes

Scaffold-DbContext '<connectionString>' EntityFramework.MicrosoftSqlServer

dnx ef dbcontext scaffold "<connectionString>"  EntityFramework.MicrosoftSqlServer

或(EF从RC2核心)

or (from EF Core RC2)

dotnet ef dbcontext scaffold "<connectionString>"  Microsoft.EntityFrameworkCore.SqlServer

您必须安装EntityFramework.Commands和EntityFramework.MicrosoftSqlServer.Design包命令工作

You must install the EntityFramework.Commands and EntityFramework.MicrosoftSqlServer.Design packages for the command to Work

这篇关于是否有一个实体框架7数据库,首先POCO发电机?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆