Is it possible to generate an EF data model (edmx) from code first POCO classes?
I like the Code First approach, but often I would prefer a visual model. The edmx model is a lot friendlier and neater for modelling a 'data model' than VS class diagrams, so it would be nice to generate an edmx from the code first POCOs and start round trip engineering, seeing as it is possible to generate POCOs from the edmx model.
你可以使用这个vs扩展来从代码第一个dbContext生成edmx图,它现在是只读的(扩展只在测试版中)http://visualstudiogallery.msdn.microsoft.com/72a60b14-1581-4b9b-89f2-846072eff19d
If you generate a database from your POCOs, you can then add a new EF item to your project and have it generate the model from the database. It's a little roundabout but it works well. I use it to check that the relations in code first models actually match what I intended.
链接地址: http://www.djcxy.com/p/90212.html上一篇: 建模多态关联数据库