本文介绍了是实体框架的价值转移到了一个新的小的应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

时的实体框架的价值转移到了一个新的小的应用程序?约10桌和WinForms应用程序。

Is Entity Framework worth moving to for a new small app? About 10 tables and a WinForms app.

即替代是数据表/数据行或LINQ到SQL

ie the alternative being DataTables/DataRows or Linq-to-SQL

推荐答案

我会不同意那些谁说的LINQ to SQL是preferable一个小项目的基础上同时使用LINQ实战经验以SQL和实体框架的小项目。我有一个很艰难的时期得到了LINQ到SQL的令人难以置信的薄弱架构更新方案(扔掉你的旧模式,重新生成一个新的,重新申请自定义)。你可以做你需要做的两个工具,在大多数情况下,但如果你的DB模式都不会改变或演变,你会花的办法的太多时间与L2S设计师摆弄。

I'm going to disagree with those who say that LINQ to SQL is preferable for a small project, based on real-world experience using both LINQ to SQL and the Entity Framework for small projects. I have a really hard time getting over LINQ to SQL's incredibly weak schema update scenario (throw away your old model, re-generate a new one, and re-apply your customizations). You can do what you need to do with both tools, for the most part, but if your DB schema will ever change or evolve you'll spend way too much time fiddling with the L2S designer.

,以避免实体框架的最佳理由是,如果你不明白。我不是在这里翻页;如果你不明白L2S,你不明白EF,然后通过各种手段使用L2S;你可能会更有效率。但是,如果你了解这两个工具时,EF几乎可以做的一切,L2S可以做,很多,很多(易模型更新,型号为先,code-第一款,可定制的codeGEN,RIA服务等。等...)。

The best reason to avoid the Entity Framework is if you don't understand it. I'm not being flip here; if you do understand L2S and you don't understand the EF, then by all means use L2S; you will probably be more productive. But if you understand both tools, the EF can do nearly everything that L2S can do and much, much more (easy model updates, model-first, code-first models, customizable codegen, RIA services, etc., etc...).

这篇关于是实体框架的价值转移到了一个新的小的应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-02 00:20