C#: What Else Do You Use Besides DataSet(C#:除了 DataSet 你还用什么)
问题描述
我发现自己对 .Net 中的 DataSet/DataTable/DataRow 范式越来越不满意,主要是因为它通常比我真正想做的要复杂几个步骤.在我绑定到控件的情况下,DataSet 很好.但在其他情况下,似乎有相当多的精神开销.
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,这似乎对通过选择进行简单的短途旅行很有用,但我觉得 .Net 中可能还有一些其他模型对了解更多信息很有用.我觉得我在这方面找到的所有帮助都默认使用 DataSet.也许那和 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!
-埃里克·斯普尔
推荐答案
自从 .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 系统都可以让您摆脱这些麻烦.
As great as LINQ is, though, I think any ORM system would allow you to do away with that dreck.
这篇关于C#:除了 DataSet 你还用什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:C#:除了 DataSet 你还用什么
基础教程推荐
- c# Math.Sqrt 实现 2022-01-01
- 将 Office 安装到 Windows 容器 (servercore:ltsc2019) 失败,错误代码为 17002 2022-01-01
- 将 XML 转换为通用列表 2022-01-01
- 如何激活MC67中的红灯 2022-01-01
- 为什么Flurl.Http DownloadFileAsync/Http客户端GetAsync需要 2022-09-30
- rabbitmq 的 REST API 2022-01-01
- MS Visual Studio .NET 的替代品 2022-01-01
- 有没有办法忽略 2GB 文件上传的 maxRequestLength 限制? 2022-01-01
- 如何在 IDE 中获取 Xamarin Studio C# 输出? 2022-01-01
- SSE 浮点算术是否可重现? 2022-01-01