C#中:你还有什么用另外的DataSet你还、什么用、DataSet

2023-09-03 12:00:29 作者:承诺、过眼云烟

我发现自己越来越不满意了DataSet / DataTable中/ DataRow的模式在.NET中,主要是因为它往往是几个步骤不是我真正想要做的更复杂。在情况下,我绑定控件,数据集的罚款。但在其他情况下,似乎有精神开销相当数量

I've found myself increasingly unsatisfied with the DataSet/DataTable/DataRow paradigm in .Net, mostly because it's often a couple of steps more complicated than what I really want to do. In cases where I'm binding to controls, DataSets are fine. But in other cases, there seems to be a fair amount of mental overhead.

我打得有点与SqlDataReader的,这似乎有利于通过选择简单的短途旅行,但我觉得可能有一些其他车型潜伏在净是有用的,进一步了解。我觉得所有的帮助下,我找到这只是使用的数据集在默认情况下。也许这和DataReader的真的是最好的选择。

I've played a bit with SqlDataReader, and that seems to be good for simple jaunts through a select, but I feel like there may be some other models lurking in .Net that are useful to learn more about. I feel like all of the help I find on this just uses DataSet by default. Maybe that and DataReader really are the best options.

我不是在寻找一个最佳/最差的故障,只是好奇我的选择是什么经验,你已经受够了他们。谢谢!

I'm not looking for a best/worst breakdown, just curious what my options are and what experiences you've had with them. Thanks!

-Eric Sipple

-Eric Sipple

推荐答案

由于.NET 3.5出来的时候,我已经完全使用LINQ。这是真的那么好;我看不出有任何理由使用任何这些旧拐杖了。

Since .NET 3.5 came out, I've exclusively used LINQ. It's really that good; I don't see any reason to use any of those old crutches any more.

一样大,LINQ是,虽然,我认为,任何的ORM系统将让你与dreck做了。

As great as LINQ is, though, I think any ORM system would allow you to do away with that dreck.