ADO.NET实体框架或ADO.NET [英] ADO.NET Entity Framework or ADO.NET

查看:150
本文介绍了ADO.NET实体框架或ADO.NET的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开始基于新项目的 ASP.NET和Windows服务器

应用程序计划于pretty的大和服务于大量的客户拉和更新频率高的。不断变化的数据。

The application is planned to be pretty big and serve large amount of clients pulling and updating high freq. changing data.

我有previously创建的项目的LINQ到SQL或Ado.Net

I have previously created projects with Linq-To-Sql or with Ado.Net.

我对这个项目计划是使用 VS2010和新EF4框架。

My plan for this project is to use VS2010 and the new EF4 framework.

  • 这将是伟大听到其他 程序员对发展方案 与实体框架

  • It would be great to hear other programmers options about development with Entity Framework

从previous利弊 经验?

Pros and cons from previous experience?

你觉得EF4准备 生产的?

Do you think EF4 is ready for production?

推荐答案

无论EF4真的是为生产做好准备是有点很难说,因为它没有被正式公布尚未....但所有的preliminary经验关于它的报道似乎表明这是相当不错的。

Whether EF4 is really ready for production is a bit hard to say since it's not officially been released yet.... but all the preliminary experiences and reports about it seem to indicate it's quite good.

不过:你需要考虑什么EF正在设法解决;这是一个两层的方法,一层映射到物理存储架构在数据库中(并支持多个后端),第二层是你的,你对编程的概念模型。当然,有必要为这些两层之间的映射

However: you need to take into consideration what EF is trying to solve; it's a two-layer approach, one layer maps to your physical storage schema in your database (and supports multiple backends), and the second layer is your conceptual model you program against. And of course, there's the need for a mapping between those two layers.

所以EF4是伟大的,如果你有大量的表,如果您有多个后端支持,如果你需要能够将物理架构映射到不同的概念模式,等等。这是伟大的复杂的企业级应用程序。

So EF4 is great if you have a large number of tables, if you have multiple backends to support, if you need to be able to map a physical schema to a different conceptual schema, and so forth. It's great for complex enterprise level applications.

但这是有代价的 - 这些额外的层做对性能,复杂性,可维护性产生影响。如果你需要这些功能,你会很乐意付出这样的代价,毫无疑问。但你需要一个?

BUT that comes at a cost - those extra layers do have an impact on performance, complexity, maintainability. If you need those features, you'll be happy to pay that price, no question. But do you need that??

当然,你可以回去直接ADO.NET - 但你真的想摆弄数据表,数据行和非类型化的行[RowName] 结构再次??真的???

Sure, you could go back to straight ADO.NET - but do you really want to fiddle around with DataTables, DataRows, and untyped Row["RowName"] constructs again?? REALLY???

所以,我的建议是这样的:

So my recommendation would be this:

  • 如果您只需要SQL Server作为你的后端
  • 如果您有一个数据库表中的一个非常简单和直接映射到一个实体对象模型

然后:使用 LINQ到SQL !为什么不呢??它仍然完全由微软在.NET 4的支持 - 赫克,他们甚至做的错误修正和添加了一些零零碎碎的 - 它的快速,它是有效的,它是精简的意思是 - 为什么不?

then: use Linq-to-SQL ! Why not?? It's still totally supported by Microsoft in .NET 4 - heck, they even did bugfixes and added a few bits and pieces - it's fast, it's efficient, it's lean and mean - so why not??

这篇关于ADO.NET实体框架或ADO.NET的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆