# C1.DataCollection.C1VirtualDataCollection-1.GetPageAsync

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_DataCollection_C1VirtualDataCollection_1_GetPageAsync_" data-uid="C1.DataCollection.C1VirtualDataCollection`1.GetPageAsync*">GetPageAsync Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_DataCollection_C1VirtualDataCollection_1_GetPageAsync_" data-uid="C1.DataCollection.C1VirtualDataCollection`1.GetPageAsync*"></a>
<h4 id="C1_DataCollection_C1VirtualDataCollection_1_GetPageAsync_System_Int32_System_Int32_System_Int32_System_Collections_Generic_IReadOnlyList_C1_DataCollection_SortDescription__C1_DataCollection_FilterExpression_System_Threading_CancellationToken_" data-uid="C1.DataCollection.C1VirtualDataCollection`1.GetPageAsync(System.Int32,System.Int32,System.Int32,System.Collections.Generic.IReadOnlyList{C1.DataCollection.SortDescription},C1.DataCollection.FilterExpression,System.Threading.CancellationToken)">GetPageAsync(int, int, int, IReadOnlyList&lt;SortDescription&gt;?, FilterExpression?, CancellationToken)</h4>
<div class="markdown level1 summary"><p>When overridden in an inherited class it returns the items in the page as well as a token to the next page.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">protected abstract Task&lt;Tuple&lt;int, IReadOnlyList&lt;T&gt;&gt;&gt; GetPageAsync(int pageIndex, int startingIndex, int count, IReadOnlyList&lt;SortDescription&gt;? sortDescriptions = null, FilterExpression? filterExpression = null, CancellationToken cancellationToken = default)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Protected MustOverride Function GetPageAsync(pageIndex As Integer, startingIndex As Integer, count As Integer, Optional sortDescriptions As IReadOnlyList(Of SortDescription) = Nothing, Optional filterExpression As FilterExpression = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Tuple(Of Integer, IReadOnlyList(Of T)))</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.int32">int</a></td>
      <td><span class="parametername">pageIndex</span></td>
      <td><p>The index of the requesting page.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">startingIndex</span></td>
      <td><p>The index where the returned items will be inserted.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">count</span></td>
      <td><p>The number of items to be returned.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlylist-1">IReadOnlyList</a>&lt;<a class="xref" href="C1.DataCollection.SortDescription.html">SortDescription</a>&gt;</td>
      <td><span class="parametername">sortDescriptions</span></td>
      <td><p>The sort descriptions.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.DataCollection.FilterExpression.html">FilterExpression</a></td>
      <td><span class="parametername">filterExpression</span></td>
      <td><p>The filter expression.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken">CancellationToken</a></td>
      <td><span class="parametername">cancellationToken</span></td>
      <td><p>Cancellation token.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1">Task</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.tuple-2">Tuple</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlylist-1">IReadOnlyList</a>&lt;T&gt;&gt;&gt;</td>
      <td><p>A tuple containing the items and a total number of items.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
