The ADO.NET Object Model

In generic terms, the data provider objects manage the database for your application, and the DataSet objects manage the data model for the application. In this section, I drill into these objects in turn, starting with the data provider objects. I use the SQL Server data provider objects for examples, but keep in mind that the basic ADO.NET syntax is the same no matter what data source you're using.

Data Providers and Their Objects

You should know about five main data provider objects:

  • Connection

  • Command

  • Parameter

  • DataReader

  • DataAdapter

These are the generic names for the classes defined in System.Data.Common namespace. In fact, you'll seldom (if ever) write code that uses these generic objects. Each data provider has implementations ...

Get MCAD/MCSD Training Guide (70-320): Developing XML Web Services and Server Components with Visual C#™ .NET and the Microsoft .NET Framework now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.