19.3. Getting Started with ADO.NET

Before you can understand the features of the C# API, you need to have a database server and a sample database to access. The focus of this chapter is to demonstrate the API and not the tools, so we do not describe the details of setting up a database, database schema, and tables. Instead, we use the standard Northwind database that ships with all Microsoft RDBMSs. We use Microsoft SQL Server as our database. To make the examples work, you need an instance of Microsoft SQL Server running locally on your machine.

We first explore how to accomplish these routine database tasks:

  • Establishing a connection to the database

  • Running a SELECT query and getting data

  • Running an INSERT, UPDATE , or DELETE query

  • Running a stored ...

Get .NET for Java Developers: Migrating to C# now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.