为什么我们还是用数据集在.NET? [英] Why do we still use DataSets in .NET?

查看:114
本文介绍了为什么我们还是用数据集在.NET?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

数据集.NET 1.0人的大事情之一,即使是现在,当使用.net 3.5我仍然觉得自己不得不使用它们....尤其是当我必须调用一个存储过程返回的数据集,然后我最终不得不手动变换到对象以使其更易于使用。

DataSets were one of the big things in .NET 1.0 and even now when using .NET 3.5 I still find myself having to use them....especially when I have to call a stored proc which returns a dataset which I then end up having to manually transform into an object to make it easier to work with.

我从来没有真正喜欢的DataSet,发现他们讨厌用...,因此,我倾向于让我的知识,对他们到最低限度(可能是一个非常糟糕的事情!)。我也preFER迅速将其转化为对象的对象或列表这样我就可以很容易地操控他们在我的code。

I've never really liked DataSets and have found them annoying to use...and as a result I've tended to keep my knowledge about them to a bare minimum (probably a very bad thing!). I also prefer to quickly transform them into an object or list of objects so I can easily manipulate them in my code.

有数据集通过了最新的使用?随着O / R Mapping工具的出现,如NHibernate的,我想知道,如果数据集将消亡或者是仍然存在的地方又在哪里?目前,我与我是否应该留出时间来重新审视数据集,并学习如何正确地使用它们,或让后面Ø撕裂/ R映射器100%,只是沟数据集完全。

Have DataSets passed their use by date? With the advent of O/R mappers such as NHibernate, I'm wondering if DataSets will die out or is there still a place for them? At the moment, I'm torn between whether I should set aside time to revisit DataSets and learn how to use them properly or to get behind O/R mappers 100% and just ditch DataSets altogether.

做数据集提供的任何技术,如NHibernate和LINQ等不能?如果不是,那么,为什么我们还在用呢?

Do DataSets offer anything that technologies such as NHibernate and LINQ etc can't? If not, why then do we still use them?

推荐答案

我从来没有使用正确的数据集(迷上了一个SQL服务器),但它是一个特别需要一次有益。我发现数据集和数据视图是pretty的方便和功能的基类实现数据/ BLL层,直到我可以把一些真正深思熟虑的到位。有很多功能回到那里,你应该知道,如果没有别的。

I've never used a DataSet correctly (hooked up to an SQL Server), but it was useful for a particular need once. I found DataSet and DataView to be pretty handy and functional base classes for implementing a data/BLL tier until I could put something really thought-out in place. There's a lot of functionality back there that you should be aware of, if nothing else.

这篇关于为什么我们还是用数据集在.NET?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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