# C1.DataCollection.AdoNet.C1AdoNetVirtualDataCollection-1

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="C1_DataCollection_AdoNet_C1AdoNetVirtualDataCollection_1" data-uid="C1.DataCollection.AdoNet.C1AdoNetVirtualDataCollection`1" class="text-break">C1AdoNetVirtualDataCollection&lt;T&gt; Class
</h1>
  <div class="markdown level0 summary"><p>Virtual collection whose data is extracted from a Ado.Net <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.data.common.dbconnection">DbConnection</a>.</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="../C1.DataCollection/C1.DataCollection.C1DataCollectionBase-1.html">C1DataCollectionBase</a>&lt;T&gt;</div>
    <div class="level2"><a class="xref" href="../C1.DataCollection/C1.DataCollection.C1VirtualDataCollection-1.html">C1VirtualDataCollection</a>&lt;T&gt;</div>
    <div class="level3"><span class="xref">C1AdoNetVirtualDataCollection&lt;T&gt;</span></div>
      <div class="level4"><a class="xref" href="C1.DataCollection.AdoNet.C1AdoNetVirtualDataCollection.html">C1AdoNetVirtualDataCollection</a></div>
  </div>
  <div class="implements">
    <h5>Implements</h5>
    <div><a class="xref" href="../C1.DataCollection/C1.DataCollection.IDataCollection-1.html">IDataCollection</a>&lt;T&gt;</div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlylist-1">IReadOnlyList</a>&lt;T&gt;</div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlycollection-1">IReadOnlyCollection</a>&lt;T&gt;</div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a>&lt;T&gt;</div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.ienumerable">IEnumerable</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.specialized.inotifycollectionchanged">INotifyCollectionChanged</a></div>
    <div><a class="xref" href="../C1.DataCollection/C1.DataCollection.ISupportIndexing-1.html">ISupportIndexing</a>&lt;T&gt;</div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.componentmodel.inotifypropertychanged">INotifyPropertyChanged</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.idisposable">IDisposable</a></div>
    <div><a class="xref" href="../C1.DataCollection/C1.DataCollection.ISupportVirtualization.html">ISupportVirtualization</a></div>
    <div><a class="xref" href="../C1.DataCollection/C1.DataCollection.ISupportRefreshing.html">ISupportRefreshing</a></div>
    <div><a class="xref" href="../C1.DataCollection/C1.DataCollection.ISupportConnection.html">ISupportConnection</a></div>
    <div><a class="xref" href="../C1.DataCollection/C1.DataCollection.ISupportAsyncLoading-1.html">ISupportAsyncLoading</a>&lt;T&gt;</div>
    <div><a class="xref" href="../C1.DataCollection/C1.DataCollection.ISupportSorting.html">ISupportSorting</a></div>
    <div><a class="xref" href="../C1.DataCollection/C1.DataCollection.ISupportFiltering.html">ISupportFiltering</a></div>
    <div><a class="xref" href="../C1.DataCollection/C1.DataCollection.ISupportEditing-1.html">ISupportEditing</a>&lt;T&gt;</div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="C1.DataCollection.AdoNet.html">C1.DataCollection.AdoNet</a></h6>
  <h6><strong>Assembly</strong>: C1.DataCollection.AdoNet.dll</h6>
  <h5 id="C1_DataCollection_AdoNet_C1AdoNetVirtualDataCollection_1_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public class C1AdoNetVirtualDataCollection&lt;T&gt; : C1VirtualDataCollection&lt;T&gt;, IDataCollection&lt;T?&gt;, IReadOnlyList&lt;T?&gt;, IReadOnlyCollection&lt;T?&gt;, IEnumerable&lt;T?&gt;, IEnumerable, INotifyCollectionChanged, ISupportIndexing&lt;T?&gt;, INotifyPropertyChanged, IDisposable, ISupportVirtualization, ISupportRefreshing, ISupportConnection, ISupportAsyncLoading&lt;T&gt;, ISupportSorting, ISupportFiltering, ISupportEditing&lt;T&gt; where T : class</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public Class C1AdoNetVirtualDataCollection(Of T As Class)
    Inherits C1VirtualDataCollection(Of T)
    Implements IDataCollection(Of T), IReadOnlyList(Of T), IReadOnlyCollection(Of T), IEnumerable(Of T), IEnumerable, INotifyCollectionChanged, ISupportIndexing(Of T), INotifyPropertyChanged, IDisposable, ISupportVirtualization, ISupportRefreshing, ISupportConnection, ISupportAsyncLoading(Of T), ISupportSorting, ISupportFiltering, ISupportEditing(Of T)</code></pre>
  </div>
  <h5 class="typeParameters">Type Parameters</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="parametername">T</span></td>
        <td></td>
      </tr>
    </tbody>
  </table>
  <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_DataCollection_AdoNet_C1AdoNetVirtualDataCollection_1__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`1.#ctor(System.Data.Common.DbConnection,System.String,System.Collections.Generic.IEnumerable{System.String},System.Int32,System.Int32,System.Nullable{System.TimeSpan})">
          <a class="xref" href="C1.DataCollection.AdoNet.C1AdoNetVirtualDataCollection-1.-ctor.html#C1_DataCollection_AdoNet_C1AdoNetVirtualDataCollection_1__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?)</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.DataCollection.AdoNet.C1AdoNetVirtualDataCollection-1.html">C1AdoNetVirtualDataCollection&lt;T&gt;</a> class.</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_DataCollection_AdoNet_C1AdoNetVirtualDataCollection_1_CanFilter_C1_DataCollection_FilterExpression_" data-uid="C1.DataCollection.AdoNet.C1AdoNetVirtualDataCollection`1.CanFilter(C1.DataCollection.FilterExpression)">
          <a class="xref" href="C1.DataCollection.AdoNet.C1AdoNetVirtualDataCollection-1.CanFilter.html#C1_DataCollection_AdoNet_C1AdoNetVirtualDataCollection_1_CanFilter_C1_DataCollection_FilterExpression_">CanFilter(FilterExpression?)</a>
        </td>
        <td class="markdown level1 summary"><p>Returns whether the collection is able to filter the specified <code class="paramref">filterExpression</code>.</p>
</td>
      </tr>
      <tr>
        <td id="C1_DataCollection_AdoNet_C1AdoNetVirtualDataCollection_1_CanInsert_System_Int32__0_" data-uid="C1.DataCollection.AdoNet.C1AdoNetVirtualDataCollection`1.CanInsert(System.Int32,`0)">
          <a class="xref" href="C1.DataCollection.AdoNet.C1AdoNetVirtualDataCollection-1.CanInsert.html#C1_DataCollection_AdoNet_C1AdoNetVirtualDataCollection_1_CanInsert_System_Int32__0_">CanInsert(int, T)</a>
        </td>
        <td class="markdown level1 summary"><p>Determines whether a new item can be inserted in the collection at the specified <code class="paramref">index</code>.</p>
</td>
      </tr>
      <tr>
        <td id="C1_DataCollection_AdoNet_C1AdoNetVirtualDataCollection_1_CanRemove_System_Int32_" data-uid="C1.DataCollection.AdoNet.C1AdoNetVirtualDataCollection`1.CanRemove(System.Int32)">
          <a class="xref" href="C1.DataCollection.AdoNet.C1AdoNetVirtualDataCollection-1.CanRemove.html#C1_DataCollection_AdoNet_C1AdoNetVirtualDataCollection_1_CanRemove_System_Int32_">CanRemove(int)</a>
        </td>
        <td class="markdown level1 summary"><p>Determines whether the item at the specified <code class="paramref">index</code> can be removed from the collection.</p>
</td>
      </tr>
      <tr>
        <td id="C1_DataCollection_AdoNet_C1AdoNetVirtualDataCollection_1_CanReplace_System_Int32__0_" data-uid="C1.DataCollection.AdoNet.C1AdoNetVirtualDataCollection`1.CanReplace(System.Int32,`0)">
          <a class="xref" href="C1.DataCollection.AdoNet.C1AdoNetVirtualDataCollection-1.CanReplace.html#C1_DataCollection_AdoNet_C1AdoNetVirtualDataCollection_1_CanReplace_System_Int32__0_">CanReplace(int, T)</a>
        </td>
        <td class="markdown level1 summary"><p>Determines whether the item at the specified <code class="paramref">index</code> can be replaced in the collection.</p>
</td>
      </tr>
      <tr>
        <td id="C1_DataCollection_AdoNet_C1AdoNetVirtualDataCollection_1_CanSort_C1_DataCollection_SortDescription___" data-uid="C1.DataCollection.AdoNet.C1AdoNetVirtualDataCollection`1.CanSort(C1.DataCollection.SortDescription[])">
          <a class="xref" href="C1.DataCollection.AdoNet.C1AdoNetVirtualDataCollection-1.CanSort.html#C1_DataCollection_AdoNet_C1AdoNetVirtualDataCollection_1_CanSort_C1_DataCollection_SortDescription___">CanSort(params SortDescription[])</a>
        </td>
        <td class="markdown level1 summary"><p>Returns whether the collection is able to sort the specified <code class="paramref">sortDescriptions</code>.</p>
</td>
      </tr>
      <tr>
        <td id="C1_DataCollection_AdoNet_C1AdoNetVirtualDataCollection_1_DetermineItemType_System_Data_Common_DbDataReader_" data-uid="C1.DataCollection.AdoNet.C1AdoNetVirtualDataCollection`1.DetermineItemType(System.Data.Common.DbDataReader)">
          <a class="xref" href="C1.DataCollection.AdoNet.C1AdoNetVirtualDataCollection-1.DetermineItemType.html#C1_DataCollection_AdoNet_C1AdoNetVirtualDataCollection_1_DetermineItemType_System_Data_Common_DbDataReader_">DetermineItemType(DbDataReader)</a>
        </td>
        <td class="markdown level1 summary"><p>Determines the type of the items.</p>
</td>
      </tr>
      <tr>
        <td id="C1_DataCollection_AdoNet_C1AdoNetVirtualDataCollection_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.AdoNet.C1AdoNetVirtualDataCollection`1.GetPageAsync(System.Int32,System.Int32,System.Int32,System.Collections.Generic.IReadOnlyList{C1.DataCollection.SortDescription},C1.DataCollection.FilterExpression,System.Threading.CancellationToken)">
          <a class="xref" href="C1.DataCollection.AdoNet.C1AdoNetVirtualDataCollection-1.GetPageAsync.html#C1_DataCollection_AdoNet_C1AdoNetVirtualDataCollection_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)</a>
        </td>
        <td 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>
</td>
      </tr>
      <tr>
        <td id="C1_DataCollection_AdoNet_C1AdoNetVirtualDataCollection_1_InsertAsyncOverride_System_Int32__0_System_Threading_CancellationToken_" data-uid="C1.DataCollection.AdoNet.C1AdoNetVirtualDataCollection`1.InsertAsyncOverride(System.Int32,`0,System.Threading.CancellationToken)">
          <a class="xref" href="C1.DataCollection.AdoNet.C1AdoNetVirtualDataCollection-1.InsertAsyncOverride.html#C1_DataCollection_AdoNet_C1AdoNetVirtualDataCollection_1_InsertAsyncOverride_System_Int32__0_System_Threading_CancellationToken_">InsertAsyncOverride(int, T, CancellationToken)</a>
        </td>
        <td class="markdown level1 summary"><p>This method is called when an item is inserted in the collection.</p>
</td>
      </tr>
      <tr>
        <td id="C1_DataCollection_AdoNet_C1AdoNetVirtualDataCollection_1_OnResetting" data-uid="C1.DataCollection.AdoNet.C1AdoNetVirtualDataCollection`1.OnResetting">
          <a class="xref" href="C1.DataCollection.AdoNet.C1AdoNetVirtualDataCollection-1.OnResetting.html#C1_DataCollection_AdoNet_C1AdoNetVirtualDataCollection_1_OnResetting">OnResetting()</a>
        </td>
        <td class="markdown level1 summary"><p>Called before the cache is reset.</p>
</td>
      </tr>
      <tr>
        <td id="C1_DataCollection_AdoNet_C1AdoNetVirtualDataCollection_1_RemoveAsyncOverride_System_Int32_System_Threading_CancellationToken_" data-uid="C1.DataCollection.AdoNet.C1AdoNetVirtualDataCollection`1.RemoveAsyncOverride(System.Int32,System.Threading.CancellationToken)">
          <a class="xref" href="C1.DataCollection.AdoNet.C1AdoNetVirtualDataCollection-1.RemoveAsyncOverride.html#C1_DataCollection_AdoNet_C1AdoNetVirtualDataCollection_1_RemoveAsyncOverride_System_Int32_System_Threading_CancellationToken_">RemoveAsyncOverride(int, CancellationToken)</a>
        </td>
        <td class="markdown level1 summary"><p>This method is called when an item is removed from the collection.</p>
</td>
      </tr>
      <tr>
        <td id="C1_DataCollection_AdoNet_C1AdoNetVirtualDataCollection_1_ReplaceAsyncOverride_System_Int32__0_System_Threading_CancellationToken_" data-uid="C1.DataCollection.AdoNet.C1AdoNetVirtualDataCollection`1.ReplaceAsyncOverride(System.Int32,`0,System.Threading.CancellationToken)">
          <a class="xref" href="C1.DataCollection.AdoNet.C1AdoNetVirtualDataCollection-1.ReplaceAsyncOverride.html#C1_DataCollection_AdoNet_C1AdoNetVirtualDataCollection_1_ReplaceAsyncOverride_System_Int32__0_System_Threading_CancellationToken_">ReplaceAsyncOverride(int, T, CancellationToken)</a>
        </td>
        <td class="markdown level1 summary"><p>This method is called when an item is replaced in the collection.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
