Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
504 views
in Technique[技术] by (71.8m points)

.net - Tool to convert Entity Framework EDMX to Code First

Is there a tool to convert an edmx into code-first? I know there was talk of one appearing in a CTP a while back, but I can't find any updates relating to this.

There's a guy on the MSDN forums who has written his own (not available yet), but nothing from the EF team.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

With EF6 Tools & Visual Studio 2013 or Visual Studio 2012, you get the option code first from database (see screenshot below)

enter image description here

If you don't see this option you need to install Entity Framework 6 Tools for Visual Studio 2012 & 2013 http://www.microsoft.com/en-gb/download/details.aspx?id=40762

This doesn't convert an EDMX to code first (as requested in question), but it can create code first from an existing DB (which I assume someone wanted to do this from EDMX, would have an existing DB, unless they deleted their DB).


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...