# C1.AdoNet.D365S.C1D365SConnection

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="C1_AdoNet_D365S_C1D365SConnection" data-uid="C1.AdoNet.D365S.C1D365SConnection" class="text-break">C1D365SConnection Class
</h1>
  <div class="markdown level0 summary"><p>Represents a connection to a D365S service, which can be used for querying or modifying the data hosted there.</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"><a class="xref" href="C1.DataConnector.AdoNet.DbConnectionWrap-3.html">DbConnectionWrap</a>&lt;<a class="xref" href="../C1.AdoNet.OData/C1.AdoNet.OData.C1ODataConnection.html">C1ODataConnection</a>, <a class="xref" href="../C1.AdoNet.OData/C1.AdoNet.OData.C1ODataCommand.html">C1ODataCommand</a>, <a class="xref" href="../C1.DataConnector/C1.DataConnector.C1DbParameter.html">C1DbParameter</a>&gt;</div>
    <div class="level5"><span class="xref">C1D365SConnection</span></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.AdoNet.D365S.html">C1.AdoNet.D365S</a></h6>
  <h6><strong>Assembly</strong>: C1.AdoNet.D365S.dll</h6>
  <h5 id="C1_AdoNet_D365S_C1D365SConnection_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public sealed class C1D365SConnection : DbConnectionWrap&lt;C1ODataConnection, C1ODataCommand, C1DbParameter&gt;, IComponent, IDbConnection, IAsyncDisposable, IDisposable</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public NotInheritable Class C1D365SConnection
    Inherits DbConnectionWrap(Of C1ODataConnection, C1ODataCommand, C1DbParameter)
    Implements IComponent, IDbConnection, IAsyncDisposable, IDisposable</code></pre>
  </div>
  <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_AdoNet_D365S_C1D365SConnection__ctor" data-uid="C1.AdoNet.D365S.C1D365SConnection.#ctor">
          <a class="xref" href="C1.AdoNet.D365S.C1D365SConnection.-ctor.html#C1_AdoNet_D365S_C1D365SConnection__ctor">C1D365SConnection()</a>
        </td>
        <td class="markdown level1 summary"><p>Create a <a class="xref" href="C1.AdoNet.D365S.C1D365SConnection.html">C1D365SConnection</a> instance.</p>
</td>
      </tr>
      <tr>
        <td id="C1_AdoNet_D365S_C1D365SConnection__ctor_C1_AdoNet_D365S_C1D365SConnectionStringBuilder_" data-uid="C1.AdoNet.D365S.C1D365SConnection.#ctor(C1.AdoNet.D365S.C1D365SConnectionStringBuilder)">
          <a class="xref" href="C1.AdoNet.D365S.C1D365SConnection.-ctor.html#C1_AdoNet_D365S_C1D365SConnection__ctor_C1_AdoNet_D365S_C1D365SConnectionStringBuilder_">C1D365SConnection(C1D365SConnectionStringBuilder)</a>
        </td>
        <td class="markdown level1 summary"><p>Creates a <a class="xref" href="C1.AdoNet.D365S.C1D365SConnection.html">C1D365SConnection</a> instance,
specifying its connection string expressed in a <a class="xref" href="C1.AdoNet.D365S.C1D365SConnectionStringBuilder.html">C1D365SConnectionStringBuilder</a>.</p>
</td>
      </tr>
      <tr>
        <td id="C1_AdoNet_D365S_C1D365SConnection__ctor_System_String_" data-uid="C1.AdoNet.D365S.C1D365SConnection.#ctor(System.String)">
          <a class="xref" href="C1.AdoNet.D365S.C1D365SConnection.-ctor.html#C1_AdoNet_D365S_C1D365SConnection__ctor_System_String_">C1D365SConnection(string)</a>
        </td>
        <td class="markdown level1 summary"><p>Creates a <a class="xref" href="C1.AdoNet.D365S.C1D365SConnection.html">C1D365SConnection</a> instance, specifying the string to be used for opening it.</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_AdoNet_D365S_C1D365SConnection_DataSource" data-uid="C1.AdoNet.D365S.C1D365SConnection.DataSource">
          <a class="xref" href="C1.AdoNet.D365S.C1D365SConnection.DataSource.html#C1_AdoNet_D365S_C1D365SConnection_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_AdoNet_D365S_C1D365SConnection_Database" data-uid="C1.AdoNet.D365S.C1D365SConnection.Database">
          <a class="xref" href="C1.AdoNet.D365S.C1D365SConnection.Database.html#C1_AdoNet_D365S_C1D365SConnection_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_AdoNet_D365S_C1D365SConnection_DbProviderFactory" data-uid="C1.AdoNet.D365S.C1D365SConnection.DbProviderFactory">
          <a class="xref" href="C1.AdoNet.D365S.C1D365SConnection.DbProviderFactory.html#C1_AdoNet_D365S_C1D365SConnection_DbProviderFactory">DbProviderFactory</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the <a class="xref" href="C1.AdoNet.D365S.C1D365SConnection.DbProviderFactory.html#C1_AdoNet_D365S_C1D365SConnection_DbProviderFactory">DbProviderFactory</a> for this connection.</p>
</td>
      </tr>
      <tr>
        <td id="C1_AdoNet_D365S_C1D365SConnection_ServerVersion" data-uid="C1.AdoNet.D365S.C1D365SConnection.ServerVersion">
          <a class="xref" href="C1.AdoNet.D365S.C1D365SConnection.ServerVersion.html#C1_AdoNet_D365S_C1D365SConnection_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>
    </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_AdoNet_D365S_C1D365SConnection_CreateDbCommandWrap" data-uid="C1.AdoNet.D365S.C1D365SConnection.CreateDbCommandWrap">
          <a class="xref" href="C1.AdoNet.D365S.C1D365SConnection.CreateDbCommandWrap.html#C1_AdoNet_D365S_C1D365SConnection_CreateDbCommandWrap">CreateDbCommandWrap()</a>
        </td>
        <td class="markdown level1 summary"><p>Create a new <a class="xref" href="C1.AdoNet.D365S.C1D365SCommand.html">C1D365SCommand</a>.</p>
</td>
      </tr>
      <tr>
        <td id="C1_AdoNet_D365S_C1D365SConnection_CreateInnerConnection" data-uid="C1.AdoNet.D365S.C1D365SConnection.CreateInnerConnection">
          <a class="xref" href="C1.AdoNet.D365S.C1D365SConnection.CreateInnerConnection.html#C1_AdoNet_D365S_C1D365SConnection_CreateInnerConnection">CreateInnerConnection()</a>
        </td>
        <td class="markdown level1 summary"><p>Create the inner connection to be used by this <a class="xref" href="C1.AdoNet.D365S.C1D365SConnection.html">C1D365SConnection</a>.</p>
</td>
      </tr>
      <tr>
        <td id="C1_AdoNet_D365S_C1D365SConnection_CreateInnerConnection_System_String_" data-uid="C1.AdoNet.D365S.C1D365SConnection.CreateInnerConnection(System.String)">
          <a class="xref" href="C1.AdoNet.D365S.C1D365SConnection.CreateInnerConnection.html#C1_AdoNet_D365S_C1D365SConnection_CreateInnerConnection_System_String_">CreateInnerConnection(string)</a>
        </td>
        <td class="markdown level1 summary"><p>Create the inner connection to be used by this <a class="xref" href="C1.AdoNet.D365S.C1D365SConnection.html">C1D365SConnection</a>.</p>
</td>
      </tr>
      <tr>
        <td id="C1_AdoNet_D365S_C1D365SConnection_Open" data-uid="C1.AdoNet.D365S.C1D365SConnection.Open">
          <a class="xref" href="C1.AdoNet.D365S.C1D365SConnection.Open.html#C1_AdoNet_D365S_C1D365SConnection_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_AdoNet_D365S_C1D365SConnection_OpenAsync_System_Threading_CancellationToken_" data-uid="C1.AdoNet.D365S.C1D365SConnection.OpenAsync(System.Threading.CancellationToken)">
          <a class="xref" href="C1.AdoNet.D365S.C1D365SConnection.OpenAsync.html#C1_AdoNet_D365S_C1D365SConnection_OpenAsync_System_Threading_CancellationToken_">OpenAsync(CancellationToken)</a>
        </td>
        <td class="markdown level1 summary"><p>An asynchronous version of <a class="xref" href="C1.AdoNet.D365S.C1D365SConnection.Open.html#C1_AdoNet_D365S_C1D365SConnection_Open">Open()</a>.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
