Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C#: What Else Do You Use Besides DataSet

Tags:

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.

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

like image 312
saalon Avatar asked Aug 20 '08 18:08

saalon


2 Answers

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.

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

like image 183
TheSmurf Avatar answered Oct 21 '22 14:10

TheSmurf


We've moved away from datasets and built our own ORM objects loosely based on CSLA. You can get the same job done with either a DataSet or LINQ or ORM but re-using it is (we've found) a lot easier. 'Less code make more happy'.

like image 28
hometoast Avatar answered Oct 21 '22 13:10

hometoast