I want to be able to get data from multiple data sources with the same code. Inside my program I get several connection string for different data sources (propably ODBC, OLE DB and SQL).
Now I don't want to write seperate code for every data connection. I can tell which classes the connection strings are meant to be used with (e.g. OleDbConnection, SqlConnection, OdbcConnection). Apparently all of them are inheritors of the class DbConnection. I wonder if i can use that to write one class which accesses them all?