Scott doesn't use datasets in ASP .NET Applications

本文探讨了在ASP.NET应用中使用数据集与业务对象的不同场景。作者认为对于复杂操作,业务对象提供了更多控制权;而在简单展示数据时,数据集更为便捷。此外,还提出数据层应保持简洁,专门负责数据库操作。

Scott doesn't use datasets in ASP .NET Applications

 <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

By Eric Wise

I generally prefer business objects and collections thereof for a good chunk of my ASP .NET applications.  This is mostly because by extending business objects with properties, methods, and events I can gain a level of control that isn't possible with the dataset.  Using a datareader to populate these objects is fast and easy.

 

However... in the case where I am just displaying data, such as binding results to a combo box or showing a summary grid, I tend to use a datatable or dataset.

……

URL: http://codebetter.com/blogs/eric.wise/archive/2005/05/02/62743.aspx

 

***

I have almost the same ideas with this guy. In the meanwhile, I also support the following idea.

 

Any DataLayer must be a simple code block, that they allow operations against DB.

That code block would not have to know on the Business Entities. Single to specialize it is to execute the operations (Store Procedures and SQL Sentences) against the engine DB (SQL, Oracle, DB2, etc.), with which this setting.

转载于:https://www.cnblogs.com/rickie/archive/2006/07/24/458093.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值