Return of the DataAdapters!

Consider the following basic scenario. You want to create a simple data-access layer—a component that lets you connect to your database, returns information about a particular order, and can submit pending changes back to the database. You want a simple way to create this component—one that allows you to write a minimum of code—but you don’t want to rely on TableAdapters for reasons we’ve previously discussed.

You can create a strongly typed DataSet and remove the TableAdapters. No major challenge there.

You already know how to create SqlConnections and SqlDataAdapters in code. You also know that you can create SqlCommandBuilders to generate updating logic, but that this approach involves (needlessly) querying the database ...

Get Programming Microsoft® ADO.NET 2.0 Core Reference, 2nd Edition 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.