为混乱的数据库实施实体框架的最佳方法是什么?

发布于 2025-01-08 04:22:20 字数 153 浏览 3 评论 0原文

我面前有一个场景,其中应用程序需要在架构上进行彻底检修,并且我想使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

成熟稳重的好男人 2025-01-15 04:22:20

我最近在也缺少一些外键的数据库模式上创建了 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?.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文