Chapter 23 ADO.NET

What’s in This Chapter

  • Connecting to databases
  • Bound controls
  • DataGridView, DataGrid, and detail interfaces
  • DataSets
  • ADO.NET

Wrox.com Downloads for This Chapter

Please note that all the code examples for this chapter are available as a part of this chapter’s code download on the book’s website at www.wrox.com/go/csharp5programmersref on the Download Code tab.

Databases play an important role in many software applications. A large percentage of business applications use databases to store, arrange, and otherwise manipulate data.

Because databases play such an important role in so many programs, companies such as Microsoft have spent a huge amount of time building database tools. As a consequence, there are several methods you can use to work with databases. Some of the most recent methods include the Entity Framework and LINQ to ADO.NET, which includes LINQ to SQL, LINQ to Entities, and LINQ to DataSet. Those techniques were covered briefly in Chapter 8, “LINQ.”

This chapter provides a brief introduction to ADO.NET, a set of classes that provide more direct access to the underlying database. It also shows how you can use bound database components and controls to quickly build simple applications that let you create, edit, and delete database records.

Get C# 5.0 Programmer's Reference 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.