为混乱的数据库实施实体框架的最佳方法是什么?
我面前有一个场景,其中应用程序需要在架构上进行彻底检修,并且我想使用 EF 4.3 作为架构的 ORM 部分。
应用程序使用的数据库很混乱,并且某些表缺少关系/键。
我想在开始设计架构之前评估什么是最好的前进方式 - 代码优先 POCO 还是 EDMX 方法?
I have in front of me a scenario in which an application needs to be overhauled architecturally and i want to use EF 4.3 to be the ORM part of the architecture.
The database used by the application is messy and some of the tables lack relations/keys.
I want to evaluate before i go about designing the architecture as to what would be the best foot forward - code first POCO or the EDMX approach?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我最近在也缺少一些外键的数据库模式上创建了 EDMX。手动创建关联并不难。对于这项任务,视觉设计器界面会派上用场。所以我会使用 edmx。
对于代码优先,我认为制造与数据库设计相匹配的类是相当麻烦的。
有关全面的一般讨论,请参阅EF 模型优先还是代码优先方法?。
I recently created an EDMX on a database schema lacking some foreign keys as well. It is not hard to create associations by hand. For that task, the visual designer surface comes in handy. So I would use edmx.
With code-first I think it is quite a hassle to manufacture classes matching the database design.
For a thorough general discussion, see EF Model First or Code First Approach?.