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

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

问题描述

我正在基于 ASP.NET和Windows服务器开始一个新项目。

I'm starting a new project based on ASP.NET and Windows server.

应用程序计划相当大, 为大量的客户提供和更新高频率。

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

我以前使用 Linq-To-Sql或Ado.Net

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

我的计划是使用 VS2010和新的EF4框架。


  • 听到其他
    程序员关于开发
    与实体框架

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

以前的
的经验有所减少?

Pros and cons from previous experience?

你认为EF4已经准备好了
生产吗?

Do you think EF4 is ready for production?

推荐答案

EF4是否真的准备好生产是有点难以说,因为它没有正式发布....但所有的初步经验和报告似乎表明它是非常好的。

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 - 但是你真的想用DataTables,DataRows和untyped Row [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-to-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天全站免登陆