if you want to construct your own classes then try this:
public class MyConnection : DbConnection
{
public MyConnection(string connectionString):base()
{
this.ConnectionString = connectionString;
}
}
public class MyCommand : DbCommand
{
public MyCommand(string sql,MyConnection connection):base()
{
this.CommandText = sql;
this.Connection = connection;
}
}
public MyAdapter : DbAdapter
{
public MyAdapter(string sql, MyConnection connection):base()
{
this.SelectCommand = new MyCommand(sql, connection);
}
}