# C1.DataConnector.AdoNet.DbConnectionWrap-3

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="C1_DataConnector_AdoNet_DbConnectionWrap_3" data-uid="C1.DataConnector.AdoNet.DbConnectionWrap`3" class="text-break">DbConnectionWrap&lt;TInnerConnection, TInnerCommand, TInnerParameter&gt; Class
</h1>
  <div class="markdown level0 summary"><p>DBConnection Wrap class that uses to custom a data provider for a specific data source.</p>
</div>
  <div class="markdown level0 conceptual"></div>
  <div class="inheritance">
    <h5>Inheritance</h5>
    <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
    <div class="level1"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.marshalbyrefobject">MarshalByRefObject</a></div>
    <div class="level2"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.componentmodel.component">Component</a></div>
    <div class="level3"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.data.common.dbconnection">DbConnection</a></div>
    <div class="level4"><span class="xref">DbConnectionWrap&lt;TInnerConnection, TInnerCommand, TInnerParameter&gt;</span></div>
      <div class="level5"><a class="xref" href="C1.AdoNet.D365S.C1D365SConnection.html">C1D365SConnection</a></div>
  </div>
  <div class="implements">
    <h5>Implements</h5>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.componentmodel.icomponent">IComponent</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.data.idbconnection">IDbConnection</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.iasyncdisposable">IAsyncDisposable</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.idisposable">IDisposable</a></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="C1.DataConnector.AdoNet.html">C1.DataConnector.AdoNet</a></h6>
  <h6><strong>Assembly</strong>: C1.AdoNet.D365S.dll</h6>
  <h5 id="C1_DataConnector_AdoNet_DbConnectionWrap_3_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public abstract class DbConnectionWrap&lt;TInnerConnection, TInnerCommand, TInnerParameter&gt; : DbConnection, IComponent, IDbConnection, IAsyncDisposable, IDisposable where TInnerConnection : DbConnection, new() where TInnerCommand : DbCommand, new() where TInnerParameter : DbParameter</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public MustInherit Class DbConnectionWrap(Of TInnerConnection As {DbConnection, New}, TInnerCommand As {DbCommand, New}, TInnerParameter As DbParameter)
    Inherits DbConnection
    Implements IComponent, IDbConnection, IAsyncDisposable, IDisposable</code></pre>
  </div>
  <h5 class="typeParameters">Type Parameters</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="parametername">TInnerConnection</span></td>
        <td></td>
      </tr>
      <tr>
        <td><span class="parametername">TInnerCommand</span></td>
        <td></td>
      </tr>
      <tr>
        <td><span class="parametername">TInnerParameter</span></td>
        <td></td>
      </tr>
    </tbody>
  </table>
  <h3 id="constructors">Constructors
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_DataConnector_AdoNet_DbConnectionWrap_3__ctor" data-uid="C1.DataConnector.AdoNet.DbConnectionWrap`3.#ctor">
          <a class="xref" href="C1.DataConnector.AdoNet.DbConnectionWrap-3.-ctor.html#C1_DataConnector_AdoNet_DbConnectionWrap_3__ctor">DbConnectionWrap()</a>
        </td>
        <td class="markdown level1 summary"><p>The default constructor of <a class="xref" href="C1.DataConnector.AdoNet.DbConnectionWrap-3.html">DbConnectionWrap&lt;TInnerConnection, TInnerCommand, TInnerParameter&gt;</a>.</p>
</td>
      </tr>
      <tr>
        <td id="C1_DataConnector_AdoNet_DbConnectionWrap_3__ctor_System_String_" data-uid="C1.DataConnector.AdoNet.DbConnectionWrap`3.#ctor(System.String)">
          <a class="xref" href="C1.DataConnector.AdoNet.DbConnectionWrap-3.-ctor.html#C1_DataConnector_AdoNet_DbConnectionWrap_3__ctor_System_String_">DbConnectionWrap(string)</a>
        </td>
        <td class="markdown level1 summary"><p>Initialize a new instance of <a class="xref" href="C1.DataConnector.AdoNet.DbConnectionWrap-3.html">DbConnectionWrap&lt;TInnerConnection, TInnerCommand, TInnerParameter&gt;</a> given a connection string.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="fields">Fields
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_DataConnector_AdoNet_DbConnectionWrap_3_Logger" data-uid="C1.DataConnector.AdoNet.DbConnectionWrap`3.Logger">
          <a class="xref" href="C1.DataConnector.AdoNet.DbConnectionWrap-3.Logger.html">Logger</a>
        </td>
        <td class="markdown level1 summary"><p>The logger where the runtime messages are passed to.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="properties">Properties
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_DataConnector_AdoNet_DbConnectionWrap_3_ConnectionString" data-uid="C1.DataConnector.AdoNet.DbConnectionWrap`3.ConnectionString">
          <a class="xref" href="C1.DataConnector.AdoNet.DbConnectionWrap-3.ConnectionString.html#C1_DataConnector_AdoNet_DbConnectionWrap_3_ConnectionString">ConnectionString</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the string used to open the connection.</p>
</td>
      </tr>
      <tr>
        <td id="C1_DataConnector_AdoNet_DbConnectionWrap_3_ConnectionTimeout" data-uid="C1.DataConnector.AdoNet.DbConnectionWrap`3.ConnectionTimeout">
          <a class="xref" href="C1.DataConnector.AdoNet.DbConnectionWrap-3.ConnectionTimeout.html#C1_DataConnector_AdoNet_DbConnectionWrap_3_ConnectionTimeout">ConnectionTimeout</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the time to wait while establishing a connection before terminating the attempt and generating an error.</p>
</td>
      </tr>
      <tr>
        <td id="C1_DataConnector_AdoNet_DbConnectionWrap_3_DataSource" data-uid="C1.DataConnector.AdoNet.DbConnectionWrap`3.DataSource">
          <a class="xref" href="C1.DataConnector.AdoNet.DbConnectionWrap-3.DataSource.html#C1_DataConnector_AdoNet_DbConnectionWrap_3_DataSource">DataSource</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the name of the database server to which to connect.</p>
</td>
      </tr>
      <tr>
        <td id="C1_DataConnector_AdoNet_DbConnectionWrap_3_Database" data-uid="C1.DataConnector.AdoNet.DbConnectionWrap`3.Database">
          <a class="xref" href="C1.DataConnector.AdoNet.DbConnectionWrap-3.Database.html#C1_DataConnector_AdoNet_DbConnectionWrap_3_Database">Database</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the name of the current database after a connection is opened,
or the database name specified in the connection string before the connection is opened.</p>
</td>
      </tr>
      <tr>
        <td id="C1_DataConnector_AdoNet_DbConnectionWrap_3_ServerVersion" data-uid="C1.DataConnector.AdoNet.DbConnectionWrap`3.ServerVersion">
          <a class="xref" href="C1.DataConnector.AdoNet.DbConnectionWrap-3.ServerVersion.html#C1_DataConnector_AdoNet_DbConnectionWrap_3_ServerVersion">ServerVersion</a>
        </td>
        <td class="markdown level1 summary"><p>Gets a string that represents the version of the server to which the object is connected.</p>
</td>
      </tr>
      <tr>
        <td id="C1_DataConnector_AdoNet_DbConnectionWrap_3_State" data-uid="C1.DataConnector.AdoNet.DbConnectionWrap`3.State">
          <a class="xref" href="C1.DataConnector.AdoNet.DbConnectionWrap-3.State.html#C1_DataConnector_AdoNet_DbConnectionWrap_3_State">State</a>
        </td>
        <td class="markdown level1 summary"><p>Gets a string that describes the state of the connection.</p>
</td>
      </tr>
      <tr>
        <td id="C1_DataConnector_AdoNet_DbConnectionWrap_3_UnderlyingConnection" data-uid="C1.DataConnector.AdoNet.DbConnectionWrap`3.UnderlyingConnection">
          <a class="xref" href="C1.DataConnector.AdoNet.DbConnectionWrap-3.UnderlyingConnection.html#C1_DataConnector_AdoNet_DbConnectionWrap_3_UnderlyingConnection">UnderlyingConnection</a>
        </td>
        <td class="markdown level1 summary"><p>The underlying connection used by this <a class="xref" href="C1.DataConnector.AdoNet.DbConnectionWrap-3.html">DbConnectionWrap&lt;TInnerConnection, TInnerCommand, TInnerParameter&gt;</a>.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="methods">Methods
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_DataConnector_AdoNet_DbConnectionWrap_3_BeginDbTransaction_System_Data_IsolationLevel_" data-uid="C1.DataConnector.AdoNet.DbConnectionWrap`3.BeginDbTransaction(System.Data.IsolationLevel)">
          <a class="xref" href="C1.DataConnector.AdoNet.DbConnectionWrap-3.BeginDbTransaction.html#C1_DataConnector_AdoNet_DbConnectionWrap_3_BeginDbTransaction_System_Data_IsolationLevel_">BeginDbTransaction(IsolationLevel)</a>
        </td>
        <td class="markdown level1 summary"><p>Initiates and returns a new transaction with the connected data source.</p>
</td>
      </tr>
      <tr>
        <td id="C1_DataConnector_AdoNet_DbConnectionWrap_3_ChangeDatabase_System_String_" data-uid="C1.DataConnector.AdoNet.DbConnectionWrap`3.ChangeDatabase(System.String)">
          <a class="xref" href="C1.DataConnector.AdoNet.DbConnectionWrap-3.ChangeDatabase.html#C1_DataConnector_AdoNet_DbConnectionWrap_3_ChangeDatabase_System_String_">ChangeDatabase(string)</a>
        </td>
        <td class="markdown level1 summary"><p>Changes the current database for an open connection.</p>
</td>
      </tr>
      <tr>
        <td id="C1_DataConnector_AdoNet_DbConnectionWrap_3_Close" data-uid="C1.DataConnector.AdoNet.DbConnectionWrap`3.Close">
          <a class="xref" href="C1.DataConnector.AdoNet.DbConnectionWrap-3.Close.html#C1_DataConnector_AdoNet_DbConnectionWrap_3_Close">Close()</a>
        </td>
        <td class="markdown level1 summary"><p>Closes the connection to the database. This is the preferred method of closing any open connection.</p>
</td>
      </tr>
      <tr>
        <td id="C1_DataConnector_AdoNet_DbConnectionWrap_3_CreateDbCommand" data-uid="C1.DataConnector.AdoNet.DbConnectionWrap`3.CreateDbCommand">
          <a class="xref" href="C1.DataConnector.AdoNet.DbConnectionWrap-3.CreateDbCommand.html#C1_DataConnector_AdoNet_DbConnectionWrap_3_CreateDbCommand">CreateDbCommand()</a>
        </td>
        <td class="markdown level1 summary"><p>Creates and returns a <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.data.common.dbcommand">DbCommand</a> object associated with the current connection.</p>
</td>
      </tr>
      <tr>
        <td id="C1_DataConnector_AdoNet_DbConnectionWrap_3_CreateDbCommandWrap" data-uid="C1.DataConnector.AdoNet.DbConnectionWrap`3.CreateDbCommandWrap">
          <a class="xref" href="C1.DataConnector.AdoNet.DbConnectionWrap-3.CreateDbCommandWrap.html#C1_DataConnector_AdoNet_DbConnectionWrap_3_CreateDbCommandWrap">CreateDbCommandWrap()</a>
        </td>
        <td class="markdown level1 summary"><p>Create a new <a class="xref" href="C1.DataConnector.AdoNet.DbCommandWrap-3.html">DbCommandWrap&lt;TInnerConnection, TInnerCommand, TInnerParameter&gt;</a>.</p>
</td>
      </tr>
      <tr>
        <td id="C1_DataConnector_AdoNet_DbConnectionWrap_3_CreateInnerConnection" data-uid="C1.DataConnector.AdoNet.DbConnectionWrap`3.CreateInnerConnection">
          <a class="xref" href="C1.DataConnector.AdoNet.DbConnectionWrap-3.CreateInnerConnection.html#C1_DataConnector_AdoNet_DbConnectionWrap_3_CreateInnerConnection">CreateInnerConnection()</a>
        </td>
        <td class="markdown level1 summary"><p>Create a inner connection for this <a class="xref" href="C1.DataConnector.AdoNet.DbConnectionWrap-3.html">DbConnectionWrap&lt;TInnerConnection, TInnerCommand, TInnerParameter&gt;</a></p>
</td>
      </tr>
      <tr>
        <td id="C1_DataConnector_AdoNet_DbConnectionWrap_3_CreateInnerConnection_System_String_" data-uid="C1.DataConnector.AdoNet.DbConnectionWrap`3.CreateInnerConnection(System.String)">
          <a class="xref" href="C1.DataConnector.AdoNet.DbConnectionWrap-3.CreateInnerConnection.html#C1_DataConnector_AdoNet_DbConnectionWrap_3_CreateInnerConnection_System_String_">CreateInnerConnection(string)</a>
        </td>
        <td class="markdown level1 summary"><p>Create a inner connection considering a connection string.</p>
</td>
      </tr>
      <tr>
        <td id="C1_DataConnector_AdoNet_DbConnectionWrap_3_Dispose_System_Boolean_" data-uid="C1.DataConnector.AdoNet.DbConnectionWrap`3.Dispose(System.Boolean)">
          <a class="xref" href="C1.DataConnector.AdoNet.DbConnectionWrap-3.Dispose.html#C1_DataConnector_AdoNet_DbConnectionWrap_3_Dispose_System_Boolean_">Dispose(bool)</a>
        </td>
        <td class="markdown level1 summary"><p>Disposes the resources of this connection.</p>
</td>
      </tr>
      <tr>
        <td id="C1_DataConnector_AdoNet_DbConnectionWrap_3_EnlistTransaction_System_Transactions_Transaction_" data-uid="C1.DataConnector.AdoNet.DbConnectionWrap`3.EnlistTransaction(System.Transactions.Transaction)">
          <a class="xref" href="C1.DataConnector.AdoNet.DbConnectionWrap-3.EnlistTransaction.html#C1_DataConnector_AdoNet_DbConnectionWrap_3_EnlistTransaction_System_Transactions_Transaction_">EnlistTransaction(Transaction)</a>
        </td>
        <td class="markdown level1 summary"><p>Enlists in the specified transaction.</p>
</td>
      </tr>
      <tr>
        <td id="C1_DataConnector_AdoNet_DbConnectionWrap_3_GetSchema" data-uid="C1.DataConnector.AdoNet.DbConnectionWrap`3.GetSchema">
          <a class="xref" href="C1.DataConnector.AdoNet.DbConnectionWrap-3.GetSchema.html#C1_DataConnector_AdoNet_DbConnectionWrap_3_GetSchema">GetSchema()</a>
        </td>
        <td class="markdown level1 summary"><p>Returns schema information for the data source of this <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.data.common.dbconnection">DbConnection</a>.</p>
</td>
      </tr>
      <tr>
        <td id="C1_DataConnector_AdoNet_DbConnectionWrap_3_GetSchema_System_String_" data-uid="C1.DataConnector.AdoNet.DbConnectionWrap`3.GetSchema(System.String)">
          <a class="xref" href="C1.DataConnector.AdoNet.DbConnectionWrap-3.GetSchema.html#C1_DataConnector_AdoNet_DbConnectionWrap_3_GetSchema_System_String_">GetSchema(string)</a>
        </td>
        <td class="markdown level1 summary"><p>Returns schema information for the data source of this <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.data.common.dbconnection">DbConnection</a> using the specified string for the schema name.</p>
</td>
      </tr>
      <tr>
        <td id="C1_DataConnector_AdoNet_DbConnectionWrap_3_GetSchema_System_String_System_String___" data-uid="C1.DataConnector.AdoNet.DbConnectionWrap`3.GetSchema(System.String,System.String[])">
          <a class="xref" href="C1.DataConnector.AdoNet.DbConnectionWrap-3.GetSchema.html#C1_DataConnector_AdoNet_DbConnectionWrap_3_GetSchema_System_String_System_String___">GetSchema(string, string[])</a>
        </td>
        <td class="markdown level1 summary"><p>Returns schema information for the data source of this <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.data.common.dbconnection">DbConnection</a>
using the specified string for the schema name and the specified string array for the restriction values.</p>
</td>
      </tr>
      <tr>
        <td id="C1_DataConnector_AdoNet_DbConnectionWrap_3_InitializeLifetimeService" data-uid="C1.DataConnector.AdoNet.DbConnectionWrap`3.InitializeLifetimeService">
          <a class="xref" href="C1.DataConnector.AdoNet.DbConnectionWrap-3.InitializeLifetimeService.html#C1_DataConnector_AdoNet_DbConnectionWrap_3_InitializeLifetimeService">InitializeLifetimeService()</a>
        </td>
        <td class="markdown level1 summary"><p>Obtains a lifetime service object to control the lifetime policy for this instance.</p>
</td>
      </tr>
      <tr>
        <td id="C1_DataConnector_AdoNet_DbConnectionWrap_3_Open" data-uid="C1.DataConnector.AdoNet.DbConnectionWrap`3.Open">
          <a class="xref" href="C1.DataConnector.AdoNet.DbConnectionWrap-3.Open.html#C1_DataConnector_AdoNet_DbConnectionWrap_3_Open">Open()</a>
        </td>
        <td class="markdown level1 summary"><p>Opens a database connection with the settings specified by the connection string.</p>
</td>
      </tr>
      <tr>
        <td id="C1_DataConnector_AdoNet_DbConnectionWrap_3_OpenAsync_System_Threading_CancellationToken_" data-uid="C1.DataConnector.AdoNet.DbConnectionWrap`3.OpenAsync(System.Threading.CancellationToken)">
          <a class="xref" href="C1.DataConnector.AdoNet.DbConnectionWrap-3.OpenAsync.html#C1_DataConnector_AdoNet_DbConnectionWrap_3_OpenAsync_System_Threading_CancellationToken_">OpenAsync(CancellationToken)</a>
        </td>
        <td class="markdown level1 summary"><p>An asynchronous version of the open method.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="events">Events
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_DataConnector_AdoNet_DbConnectionWrap_3_StateChange" data-uid="C1.DataConnector.AdoNet.DbConnectionWrap`3.StateChange">
          <a class="xref" href="C1.DataConnector.AdoNet.DbConnectionWrap-3.StateChange.html">StateChange</a>
        </td>
        <td class="markdown level1 summary"><p>StateChange event</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
