Entity Framework 4.1 reverse engineering code-only

廉价感情. 提交于 2019-12-06 14:33:43

The tool is called EF Power Tools CTP1.

If your database is SQL Server, or SQL CE 4.0 then you can use the "Entity Framework Reverse POCO Generator" available at visualstudiogallery.msdn.microsoft.com

Update:

This answer is no longer relevant as EF 5+ is completely full-featured with code-first migration tools.


I had abandoned code-first for a while because it did not appear to be as full-featured as I had hoped. Recently I had some time to play with EF 4.1 a little more and examine it in more detail. All I really believe they are lacking now is a data/schema migration ability. This dropping and recreating of the database is not very ideal.

In my examination I found that the tool I am asking for in this question was indeed shipped with EF 4.1. It is a code generation template called "ADO.NET DbContext Generator". It can be found by opening up your existing EDMX file, right-clicking your design surface, and selecting "Add Code Generation Item".

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