Search code examples
entity-frameworkado.netstrongly-typed-dataset

Why must books teach to use datasets


Where ever I read I see experts writing to stay away from typed datasets and use the entity framework or similar.

On the other hand almost every ado.net book I read will show first how to use datasets and some of them only use datasets, that gives me the impression that its not bad. if it is why teach it for the new programers?


Solution

  • All depends on what you want to do with the data you're pulling from your DB.

    I use a DataSet to load data in to a Crystal Report because it plays well together. Anywhere else in my app i use mostly anonymous types. Either way i use the EntityFramework to pull the data from my DB. I get results much faster that way than using ADO.NET and DataSets. If i need raw performance I use ADO.NET. For batch updates for example.