Opening Connections and Handling Events

Yesterday you saw how the IDbConnection interface could be used by a .NET Data Provider to implement a class that is used to communicate with a data store. As such, the connection classes are responsible for all communication between the client and the data store, including the execution of queries and commands and the processing of any messages sent back from the data store.

Note

Because the connection class is responsible for communication, it's also implicitly responsible for providing credentials to the data store in order to be authenticated and authorized to access the data protected by the data store. As you can imagine, the credentials are provided through the ConnectionString property, so handling ...

Get Sams Teach Yourself ADO.NET in 21 Days 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.