This article aims to show how to work with ADO.NET using System.Data interfaces. For example from System.Data.IDbConnection interface are derived all connection classes, eg. SqlConnection, OleDbConnection, OdbcConnection, MySqlConnection, OracleConnection & etc... Same as all ADO.NET commands are derived from System.Data.IDbCommand interface.
Many developers initialize these objects when they use them. I offer to implement wrapper class which will handle all ADO.NET stuff for developer. As this class works with low level interfaces, like IDbCommand, IDbConnection it can handle any ADO.NET provider. Such class demo example is shown below.
Using such wrapper class your code will be more business logic based rather than filled with ADO.NET objects initialization which makes hard readable code and if you will find some ADO.NET objects initialization error you will require just to change wrapper class rather than to change all your program code where it used.