Instantiate IDataAdapter from instance of IDbConnection
<p>I have an instance of IDbConnection, which can be any connection, Sql, OleDb, etc.
I want to make a generic wrapper so I can just send the wrapper a connection and get a nice set of methods for easy manipulation.
I have a Query method, I want it to return a DataTable, so I can do</p>

<pre><code>IDataAdapter adapter = new OleDbDataAdapter();
adapter.SelectCommand = myCommand;
DataSet ds = new DataSet();
adapter.Fill(ds);
</code></pre>

<p>The problem is I have to use OleDbAdapter and it wouldn't work for SQL, I don't really want to write "driver specific" code.
Is there a way I can get a IDataAdapter instance from my instantiated IDbConnection object? I know I can create a command doing</p>

<pre><code>IDbCommand command = _connection.CreateCommand();
</code></pre>

<p>It's only logical to think there must be some easy way to do the same with an IDataAdapter.</p>

<p>EDIT:</p>

<pre><code>IDataReader reader = command.ExecuteReader();
DataTable dt = new DataTable();
dt.Load(reader);
</code></pre>

<p>Well not exactly what I asked for but a nice solution.</p>
