I finished the final chapter of Pro ADO.NET 2.0 last night and highly recommend it if you are looking for a book on ADO.NET. Read about it on Apress.
Summary
Pro ADO.NET 2.0 is about half the thickness of an older book it replaces on my bookshelf, yet delivers higher quality content, better code examples, and more best practices. It has a very comfortable and easy-to-follow writing style that gets you up to speed quickly on the fundamentals and then hits you with best practices, do's and don'ts, and advanced scenarios. It is evident from the examples and recommendations in the book that the author is an actual developer solving real-world problems on a day-to-day basis.
Description
Pro ADO.NET 2.0 starts out with the basics: ADO.NET Object Model, Connected vs. Disconnected Models of ADO.NET, and the different players in each category (Connections, DataReaders, DataSets, etc.). It provides a concise and meaningful description of these objects as opposed to regurgitating MSDN documentation and every last property or setting.
Examples are provided throughout the book in both C# and VB.NET that target mostly SQL Server, but mention Oracle when appropriate. The examples cover the basics and provide “templates” of how the ADO.NET code should flow in your own programs. Once the fundamentals are described, the author goes further and discusses more advanced, real-world scenarious as well as the do's and don'ts.
The focus on best practices and advanced scenarios in Pro ADO.NET 2.0 deserves a special note. Many books in the past on ADO.NET just bore you with too many details on the object model and basics that don't help much in the real world. Sahil has taken the book to a much more useful and practical level by helping you avoid pitfalls and explaining how and when to use the most advanced topics, such as transactions, SQLCLR, concurrency in multiuser applications, etc.
The last chapter focuses on ADO.NET Best Practices. Here is where we get into some discussions that are usually heavy battles on blogs, such as DataReader vs. DataSet, Objects vs. DataSets, etc., as well as good discussions on Transactions, Caching, Datasets / Typed Datasets, etc. Sahil does a good job of introducing these topics and providing some real-world thoughts and avoiding all the non-objective junk that goes along with it.
What I Liked
Some thoughts on what I enjoyed:
- Layout and Writing Style - Easy-to-read with no fluff.
- Coverage of Advanced Topics - Great coverage of transactions and concurrency in database updates.
- Focus on Best Practices - Various tips on using a dataset with a complex hierarchy of data, connected vs. disconnected data access, when and how to use transactions, and the last chapter dedicated to various best practices of all kinds.
Additional Content I Would Have Liked
A few items that I would have enjoyed reading about in more detail, but are probably a bit out-of-scope for the book
- Sahil's thoughts on Enterprise Library and various application blocks put out by Microsoft Patterns and Practices to help with ADO.NET.
- More about best practices on implementing and interacting with a data layer from the presentation and business layers in your applications ( a skeleton of using ADO.NET from 2-layer and 3-layer applications ).
Links
A couple of links associated with the book:
Review by David Hayden ( Website / Blog )