# C1.AdoNet.OData.C1ODataConnection

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="C1_AdoNet_OData_C1ODataConnection" data-uid="C1.AdoNet.OData.C1ODataConnection" class="text-break">C1ODataConnection Class
</h1>
  <div class="markdown level0 summary"><p>Represents a connection to an OData 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.AdoNet.CSV/C1.DataConnector.AdoNet.C1ConnectionBase.html">C1ConnectionBase</a></div>
    <div class="level5"><a class="xref" href="C1.DataConnector.AdoNet.C1ConnectionBase-1.html">C1ConnectionBase</a>&lt;<a class="xref" href="C1.AdoNet.OData.C1ODataConnection.html">C1ODataConnection</a>&gt;</div>
    <div class="level6"><span class="xref">C1ODataConnection</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.idisposable">IDisposable</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.iasyncdisposable">IAsyncDisposable</a></div>
    <div><a class="xref" href="../C1.DataConnector/C1.DataConnector.Interfaces.IExtendedConnection.html">IExtendedConnection</a></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="C1.AdoNet.OData.html">C1.AdoNet.OData</a></h6>
  <h6><strong>Assembly</strong>: C1.AdoNet.OData.dll</h6>
  <h5 id="C1_AdoNet_OData_C1ODataConnection_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public sealed class C1ODataConnection : C1ConnectionBase&lt;C1ODataConnection&gt;, IComponent, IDbConnection, IDisposable, IAsyncDisposable, IExtendedConnection</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public NotInheritable Class C1ODataConnection
    Inherits C1ConnectionBase(Of C1ODataConnection)
    Implements IComponent, IDbConnection, IDisposable, IAsyncDisposable, IExtendedConnection</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_OData_C1ODataConnection__ctor" data-uid="C1.AdoNet.OData.C1ODataConnection.#ctor">
          <a class="xref" href="C1.AdoNet.OData.C1ODataConnection.-ctor.html#C1_AdoNet_OData_C1ODataConnection__ctor">C1ODataConnection()</a>
        </td>
        <td class="markdown level1 summary"><p>Creates a new instance of <a class="xref" href="C1.AdoNet.OData.C1ODataConnection.html">C1ODataConnection</a>.</p>
</td>
      </tr>
      <tr>
        <td id="C1_AdoNet_OData_C1ODataConnection__ctor_C1_AdoNet_OData_C1ODataConnectionStringBuilder_" data-uid="C1.AdoNet.OData.C1ODataConnection.#ctor(C1.AdoNet.OData.C1ODataConnectionStringBuilder)">
          <a class="xref" href="C1.AdoNet.OData.C1ODataConnection.-ctor.html#C1_AdoNet_OData_C1ODataConnection__ctor_C1_AdoNet_OData_C1ODataConnectionStringBuilder_">C1ODataConnection(C1ODataConnectionStringBuilder)</a>
        </td>
        <td class="markdown level1 summary"><p>Creates a <a class="xref" href="C1.AdoNet.OData.C1ODataConnection.html">C1ODataConnection</a> instance, specifying its connection
string expressed in a <a class="xref" href="C1.AdoNet.OData.C1ODataConnectionStringBuilder.html">C1ODataConnectionStringBuilder</a>.</p>
</td>
      </tr>
      <tr>
        <td id="C1_AdoNet_OData_C1ODataConnection__ctor_System_String_" data-uid="C1.AdoNet.OData.C1ODataConnection.#ctor(System.String)">
          <a class="xref" href="C1.AdoNet.OData.C1ODataConnection.-ctor.html#C1_AdoNet_OData_C1ODataConnection__ctor_System_String_">C1ODataConnection(string)</a>
        </td>
        <td class="markdown level1 summary"><p>Creates a <a class="xref" href="C1.AdoNet.OData.C1ODataConnection.html">C1ODataConnection</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_OData_C1ODataConnection_BaseUrl" data-uid="C1.AdoNet.OData.C1ODataConnection.BaseUrl">
          <a class="xref" href="C1.AdoNet.OData.C1ODataConnection.BaseUrl.html#C1_AdoNet_OData_C1ODataConnection_BaseUrl">BaseUrl</a>
        </td>
        <td class="markdown level1 summary"><p>The base URL of the OData service.</p>
</td>
      </tr>
      <tr>
        <td id="C1_AdoNet_OData_C1ODataConnection_CustomFunctions" data-uid="C1.AdoNet.OData.C1ODataConnection.CustomFunctions">
          <a class="xref" href="C1.AdoNet.OData.C1ODataConnection.CustomFunctions.html#C1_AdoNet_OData_C1ODataConnection_CustomFunctions">CustomFunctions</a>
        </td>
        <td class="markdown level1 summary"><p>Allows the declaration of a subset of functions supported by the target data source.</p>
</td>
      </tr>
      <tr>
        <td id="C1_AdoNet_OData_C1ODataConnection_CustomHeaders" data-uid="C1.AdoNet.OData.C1ODataConnection.CustomHeaders">
          <a class="xref" href="C1.AdoNet.OData.C1ODataConnection.CustomHeaders.html#C1_AdoNet_OData_C1ODataConnection_CustomHeaders">CustomHeaders</a>
        </td>
        <td class="markdown level1 summary"><p>Custom headers that can be passed</p>
</td>
      </tr>
      <tr>
        <td id="C1_AdoNet_OData_C1ODataConnection_CustomOperators" data-uid="C1.AdoNet.OData.C1ODataConnection.CustomOperators">
          <a class="xref" href="C1.AdoNet.OData.C1ODataConnection.CustomOperators.html#C1_AdoNet_OData_C1ODataConnection_CustomOperators">CustomOperators</a>
        </td>
        <td class="markdown level1 summary"><p>Allows the declaration of a subset of operators supported by the target data source.</p>
</td>
      </tr>
      <tr>
        <td id="C1_AdoNet_OData_C1ODataConnection_DataSource" data-uid="C1.AdoNet.OData.C1ODataConnection.DataSource">
          <a class="xref" href="C1.AdoNet.OData.C1ODataConnection.DataSource.html#C1_AdoNet_OData_C1ODataConnection_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_OData_C1ODataConnection_Database" data-uid="C1.AdoNet.OData.C1ODataConnection.Database">
          <a class="xref" href="C1.AdoNet.OData.C1ODataConnection.Database.html#C1_AdoNet_OData_C1ODataConnection_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_OData_C1ODataConnection_DbProviderFactory" data-uid="C1.AdoNet.OData.C1ODataConnection.DbProviderFactory">
          <a class="xref" href="C1.AdoNet.OData.C1ODataConnection.DbProviderFactory.html#C1_AdoNet_OData_C1ODataConnection_DbProviderFactory">DbProviderFactory</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the <a class="xref" href="C1.AdoNet.OData.C1ODataConnection.DbProviderFactory.html#C1_AdoNet_OData_C1ODataConnection_DbProviderFactory">DbProviderFactory</a> for this connection.</p>
</td>
      </tr>
      <tr>
        <td id="C1_AdoNet_OData_C1ODataConnection_IsNotValidForRead" data-uid="C1.AdoNet.OData.C1ODataConnection.IsNotValidForRead">
          <a class="xref" href="C1.AdoNet.OData.C1ODataConnection.IsNotValidForRead.html#C1_AdoNet_OData_C1ODataConnection_IsNotValidForRead">IsNotValidForRead</a>
        </td>
        <td class="markdown level1 summary"><p>IsNotValidForRead columns</p>
</td>
      </tr>
      <tr>
        <td id="C1_AdoNet_OData_C1ODataConnection_ODataVersion" data-uid="C1.AdoNet.OData.C1ODataConnection.ODataVersion">
          <a class="xref" href="C1.AdoNet.OData.C1ODataConnection.ODataVersion.html#C1_AdoNet_OData_C1ODataConnection_ODataVersion">ODataVersion</a>
        </td>
        <td class="markdown level1 summary"><p>An int specifying which version of Odata is being used by <a class="xref" href="C1.AdoNet.OData.C1ODataConnection.html">C1ODataConnection</a>.</p>
</td>
      </tr>
      <tr>
        <td id="C1_AdoNet_OData_C1ODataConnection_ServerTimeZone" data-uid="C1.AdoNet.OData.C1ODataConnection.ServerTimeZone">
          <a class="xref" href="C1.AdoNet.OData.C1ODataConnection.ServerTimeZone.html#C1_AdoNet_OData_C1ODataConnection_ServerTimeZone">ServerTimeZone</a>
        </td>
        <td class="markdown level1 summary"><p>Server TimeZone</p>
</td>
      </tr>
      <tr>
        <td id="C1_AdoNet_OData_C1ODataConnection_ServerVersion" data-uid="C1.AdoNet.OData.C1ODataConnection.ServerVersion">
          <a class="xref" href="C1.AdoNet.OData.C1ODataConnection.ServerVersion.html#C1_AdoNet_OData_C1ODataConnection_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_AdoNet_OData_C1ODataConnection_SupportGroupBy" data-uid="C1.AdoNet.OData.C1ODataConnection.SupportGroupBy">
          <a class="xref" href="C1.AdoNet.OData.C1ODataConnection.SupportGroupBy.html#C1_AdoNet_OData_C1ODataConnection_SupportGroupBy">SupportGroupBy</a>
        </td>
        <td class="markdown level1 summary"><p>A boolean specifying whether or not this <a class="xref" href="C1.AdoNet.OData.C1ODataConnection.html">C1ODataConnection</a> is using SupportGroupBy.</p>
</td>
      </tr>
      <tr>
        <td id="C1_AdoNet_OData_C1ODataConnection_SupportLimit" data-uid="C1.AdoNet.OData.C1ODataConnection.SupportLimit">
          <a class="xref" href="C1.AdoNet.OData.C1ODataConnection.SupportLimit.html#C1_AdoNet_OData_C1ODataConnection_SupportLimit">SupportLimit</a>
        </td>
        <td class="markdown level1 summary"><p>A boolean specifying whether or not this <a class="xref" href="C1.AdoNet.OData.C1ODataConnection.html">C1ODataConnection</a> is using SupportLimit.</p>
</td>
      </tr>
      <tr>
        <td id="C1_AdoNet_OData_C1ODataConnection_SupportOrderBy" data-uid="C1.AdoNet.OData.C1ODataConnection.SupportOrderBy">
          <a class="xref" href="C1.AdoNet.OData.C1ODataConnection.SupportOrderBy.html#C1_AdoNet_OData_C1ODataConnection_SupportOrderBy">SupportOrderBy</a>
        </td>
        <td class="markdown level1 summary"><p>A boolean specifying whether or not this <a class="xref" href="C1.AdoNet.OData.C1ODataConnection.html">C1ODataConnection</a> is using SupportOrderBy.</p>
</td>
      </tr>
      <tr>
        <td id="C1_AdoNet_OData_C1ODataConnection_UnSupportedColumns" data-uid="C1.AdoNet.OData.C1ODataConnection.UnSupportedColumns">
          <a class="xref" href="C1.AdoNet.OData.C1ODataConnection.UnSupportedColumns.html#C1_AdoNet_OData_C1ODataConnection_UnSupportedColumns">UnSupportedColumns</a>
        </td>
        <td class="markdown level1 summary"><p>Allows the declaration of a subset of columns supported by the target data source.</p>
</td>
      </tr>
      <tr>
        <td id="C1_AdoNet_OData_C1ODataConnection_UseDynamicType" data-uid="C1.AdoNet.OData.C1ODataConnection.UseDynamicType">
          <a class="xref" href="C1.AdoNet.OData.C1ODataConnection.UseDynamicType.html#C1_AdoNet_OData_C1ODataConnection_UseDynamicType">UseDynamicType</a>
        </td>
        <td class="markdown level1 summary"><p>A boolean specifying whether or not this <a class="xref" href="C1.AdoNet.OData.C1ODataConnection.html">C1ODataConnection</a> is using dynamic type.</p>
</td>
      </tr>
      <tr>
        <td id="C1_AdoNet_OData_C1ODataConnection_UseEtag" data-uid="C1.AdoNet.OData.C1ODataConnection.UseEtag">
          <a class="xref" href="C1.AdoNet.OData.C1ODataConnection.UseEtag.html#C1_AdoNet_OData_C1ODataConnection_UseEtag">UseEtag</a>
        </td>
        <td class="markdown level1 summary"><p>A boolean specifying whether or not this <a class="xref" href="C1.AdoNet.OData.C1ODataConnection.html">C1ODataConnection</a> is using Etag.</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_OData_C1ODataConnection_BeginDbTransaction_System_Data_IsolationLevel_" data-uid="C1.AdoNet.OData.C1ODataConnection.BeginDbTransaction(System.Data.IsolationLevel)">
          <a class="xref" href="C1.AdoNet.OData.C1ODataConnection.BeginDbTransaction.html#C1_AdoNet_OData_C1ODataConnection_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_AdoNet_OData_C1ODataConnection_ChangeDatabase_System_String_" data-uid="C1.AdoNet.OData.C1ODataConnection.ChangeDatabase(System.String)">
          <a class="xref" href="C1.AdoNet.OData.C1ODataConnection.ChangeDatabase.html#C1_AdoNet_OData_C1ODataConnection_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_AdoNet_OData_C1ODataConnection_Close" data-uid="C1.AdoNet.OData.C1ODataConnection.Close">
          <a class="xref" href="C1.AdoNet.OData.C1ODataConnection.Close.html#C1_AdoNet_OData_C1ODataConnection_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_AdoNet_OData_C1ODataConnection_CreateDbCommand" data-uid="C1.AdoNet.OData.C1ODataConnection.CreateDbCommand">
          <a class="xref" href="C1.AdoNet.OData.C1ODataConnection.CreateDbCommand.html#C1_AdoNet_OData_C1ODataConnection_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_AdoNet_OData_C1ODataConnection_GetColumnsSchema_System_String___" data-uid="C1.AdoNet.OData.C1ODataConnection.GetColumnsSchema(System.String[])">
          <a class="xref" href="C1.AdoNet.OData.C1ODataConnection.GetColumnsSchema.html#C1_AdoNet_OData_C1ODataConnection_GetColumnsSchema_System_String___">GetColumnsSchema(string[])</a>
        </td>
        <td class="markdown level1 summary"><p>Retrieve the metadata relatively to the columns.</p>
</td>
      </tr>
      <tr>
        <td id="C1_AdoNet_OData_C1ODataConnection_GetForeignKeySchema_System_String___" data-uid="C1.AdoNet.OData.C1ODataConnection.GetForeignKeySchema(System.String[])">
          <a class="xref" href="C1.AdoNet.OData.C1ODataConnection.GetForeignKeySchema.html#C1_AdoNet_OData_C1ODataConnection_GetForeignKeySchema_System_String___">GetForeignKeySchema(string[])</a>
        </td>
        <td class="markdown level1 summary"><p>Retrieve the metadata relatively to the foreign keys.</p>
</td>
      </tr>
      <tr>
        <td id="C1_AdoNet_OData_C1ODataConnection_GetIndexColumns_System_String___" data-uid="C1.AdoNet.OData.C1ODataConnection.GetIndexColumns(System.String[])">
          <a class="xref" href="C1.AdoNet.OData.C1ODataConnection.GetIndexColumns.html#C1_AdoNet_OData_C1ODataConnection_GetIndexColumns_System_String___">GetIndexColumns(string[])</a>
        </td>
        <td class="markdown level1 summary"><p>Retrieve the metadata relatively to the index columns.</p>
</td>
      </tr>
      <tr>
        <td id="C1_AdoNet_OData_C1ODataConnection_GetIndexesSchema_System_String___" data-uid="C1.AdoNet.OData.C1ODataConnection.GetIndexesSchema(System.String[])">
          <a class="xref" href="C1.AdoNet.OData.C1ODataConnection.GetIndexesSchema.html#C1_AdoNet_OData_C1ODataConnection_GetIndexesSchema_System_String___">GetIndexesSchema(string[])</a>
        </td>
        <td class="markdown level1 summary"><p>Retrieve the metadata relatively to the indexes.</p>
</td>
      </tr>
      <tr>
        <td id="C1_AdoNet_OData_C1ODataConnection_GetPrimaryKeySchema_System_String___" data-uid="C1.AdoNet.OData.C1ODataConnection.GetPrimaryKeySchema(System.String[])">
          <a class="xref" href="C1.AdoNet.OData.C1ODataConnection.GetPrimaryKeySchema.html#C1_AdoNet_OData_C1ODataConnection_GetPrimaryKeySchema_System_String___">GetPrimaryKeySchema(string[])</a>
        </td>
        <td class="markdown level1 summary"><p>Retrieve the metadata relatively to the primary keys.</p>
</td>
      </tr>
      <tr>
        <td id="C1_AdoNet_OData_C1ODataConnection_GetTablesSchema_System_String___" data-uid="C1.AdoNet.OData.C1ODataConnection.GetTablesSchema(System.String[])">
          <a class="xref" href="C1.AdoNet.OData.C1ODataConnection.GetTablesSchema.html#C1_AdoNet_OData_C1ODataConnection_GetTablesSchema_System_String___">GetTablesSchema(string[])</a>
        </td>
        <td class="markdown level1 summary"><p>Retrieve the metadata relatively to the tables.</p>
</td>
      </tr>
      <tr>
        <td id="C1_AdoNet_OData_C1ODataConnection_OnConnectionStringChanged" data-uid="C1.AdoNet.OData.C1ODataConnection.OnConnectionStringChanged">
          <a class="xref" href="C1.AdoNet.OData.C1ODataConnection.OnConnectionStringChanged.html#C1_AdoNet_OData_C1ODataConnection_OnConnectionStringChanged">OnConnectionStringChanged()</a>
        </td>
        <td class="markdown level1 summary"><p>A method that is called every time there is a change to the connection string used by this <a class="xref" href="C1.AdoNet.OData.C1ODataConnection.html">C1ODataConnection</a>.</p>
</td>
      </tr>
      <tr>
        <td id="C1_AdoNet_OData_C1ODataConnection_Open" data-uid="C1.AdoNet.OData.C1ODataConnection.Open">
          <a class="xref" href="C1.AdoNet.OData.C1ODataConnection.Open.html#C1_AdoNet_OData_C1ODataConnection_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_OData_C1ODataConnection_OpenAsync_System_Threading_CancellationToken_" data-uid="C1.AdoNet.OData.C1ODataConnection.OpenAsync(System.Threading.CancellationToken)">
          <a class="xref" href="C1.AdoNet.OData.C1ODataConnection.OpenAsync.html#C1_AdoNet_OData_C1ODataConnection_OpenAsync_System_Threading_CancellationToken_">OpenAsync(CancellationToken)</a>
        </td>
        <td class="markdown level1 summary"><p>An asynchronous version of <a class="xref" href="C1.AdoNet.OData.C1ODataConnection.Open.html#C1_AdoNet_OData_C1ODataConnection_Open">Open()</a>.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
