Chapter 10. ADO.NET and LINQ

WHAT YOU WILL LEARN IN THIS CHAPTER

  • The architecture of ADO.NET

  • How ADO.NET connects to databases

  • Using ADO.NET to retrieve data

  • Using ADO.NET to update databases

  • Creating and using transactions

  • Retrieving data with LINQ to SQL

  • Updating databases using LINQ to SQL

ADO.NET 1.x was the successor to ActiveX Data Objects 2.6 (ADO). The main goal of ADO.NET 1.x was to enable developers to easily create distributed, data-sharing applications in the .NET Framework. The main goals of ADO.NET today are to improve the performance of existing features in ADO.NET 1.x, to provide easier use, and to add new features without breaking backward compatibility.

Note

Throughout this chapter, when ADO.NET is mentioned without a version number after it (that is, 1.x, 2.0, 3.5, or 4), the statement applies to all versions of ADO.NET.

ADO.NET 1.x was built upon industry standards such as XML, and it provided a data-access interface to communicate with data sources such as SQL Server and Oracle. ADO.NET 4 continues to build upon these concepts, while increasing performance. Applications can use ADO.NET to connect to these data sources and retrieve, manipulate, and update data. ADO.NET 4 does not break any compatibility with ADO.NET 2.0 or 1.x; it only adds to the stack of functionality.

In solutions that require disconnected or remote access to data, ADO.NET uses XML to exchange data between programs or with Web pages. Any component that can read XML can make use of ADO.NET components. ...

Get Professional Visual Basic® 2010 and .NET 4 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.