# C1.DataCollection.AdoNet.C1AdoNetCursorDataCollection-1.-ctor

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_DataCollection_AdoNet_C1AdoNetCursorDataCollection_1__ctor_" data-uid="C1.DataCollection.AdoNet.C1AdoNetCursorDataCollection`1.#ctor*">C1AdoNetCursorDataCollection Constructor
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_DataCollection_AdoNet_C1AdoNetCursorDataCollection_1__ctor_" data-uid="C1.DataCollection.AdoNet.C1AdoNetCursorDataCollection`1.#ctor*"></a>
<h4 id="C1_DataCollection_AdoNet_C1AdoNetCursorDataCollection_1__ctor_System_Data_Common_DbConnection_System_String_System_Collections_Generic_IEnumerable_System_String__System_Int32_" data-uid="C1.DataCollection.AdoNet.C1AdoNetCursorDataCollection`1.#ctor(System.Data.Common.DbConnection,System.String,System.Collections.Generic.IEnumerable{System.String},System.Int32)">C1AdoNetCursorDataCollection(DbConnection, string, IEnumerable&lt;string&gt;?, int)</h4>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.DataCollection.AdoNet.C1AdoNetCursorDataCollection-1.html">C1AdoNetCursorDataCollection&lt;T&gt;</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 C1AdoNetCursorDataCollection(DbConnection connection, string tableName, IEnumerable&lt;string&gt;? fields = null, int pageSize = 50)</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 pageSize As Integer = 50)</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">pageSize</span></td>
      <td><p>Size of the page to be fetched.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
