# C1.DataCollection.AdoNet.C1AdoNetVirtualDataCollection.-ctor

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_DataCollection_AdoNet_C1AdoNetVirtualDataCollection__ctor_" data-uid="C1.DataCollection.AdoNet.C1AdoNetVirtualDataCollection.#ctor*">C1AdoNetVirtualDataCollection Constructor
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_DataCollection_AdoNet_C1AdoNetVirtualDataCollection__ctor_" data-uid="C1.DataCollection.AdoNet.C1AdoNetVirtualDataCollection.#ctor*"></a>
<h4 id="C1_DataCollection_AdoNet_C1AdoNetVirtualDataCollection__ctor_System_Data_Common_DbConnection_System_String_System_Collections_Generic_IEnumerable_System_String__System_Int32_System_Int32_System_Nullable_System_TimeSpan__" data-uid="C1.DataCollection.AdoNet.C1AdoNetVirtualDataCollection.#ctor(System.Data.Common.DbConnection,System.String,System.Collections.Generic.IEnumerable{System.String},System.Int32,System.Int32,System.Nullable{System.TimeSpan})">C1AdoNetVirtualDataCollection(DbConnection, string, IEnumerable&lt;string&gt;?, int, int, TimeSpan?)</h4>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.DataCollection.AdoNet.C1AdoNetVirtualDataCollection.html">C1AdoNetVirtualDataCollection</a> class.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public C1AdoNetVirtualDataCollection(DbConnection connection, string tableName, IEnumerable&lt;string&gt;? fields = null, int maxParallelRequests = 4, int maxActiveRequests = 4, TimeSpan? requestDelay = null)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(connection As DbConnection, tableName As String, Optional fields As IEnumerable(Of String) = Nothing, Optional maxParallelRequests As Integer = 4, Optional maxActiveRequests As Integer = 4, Optional requestDelay As TimeSpan? = Nothing)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.data.common.dbconnection">DbConnection</a></td>
      <td><span class="parametername">connection</span></td>
      <td><p>The connection to the Ado.Net source.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">tableName</span></td>
      <td><p>The name of the table.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>&gt;</td>
      <td><span class="parametername">fields</span></td>
      <td><p>The fields that will be queried.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">maxParallelRequests</span></td>
      <td><p>The maximum parallel requests.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">maxActiveRequests</span></td>
      <td><p>The maximum active requests.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.timespan">TimeSpan</a>?</td>
      <td><span class="parametername">requestDelay</span></td>
      <td><p>The request delay.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
