# C1.Web.Mvc.CollectionViewHelper.Read

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Web_Mvc_CollectionViewHelper_Read_" data-uid="C1.Web.Mvc.CollectionViewHelper.Read*">Read Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Web_Mvc_CollectionViewHelper_Read_" data-uid="C1.Web.Mvc.CollectionViewHelper.Read*"></a>
<h4 id="C1_Web_Mvc_CollectionViewHelper_Read__1_C1_Web_Mvc_CollectionViewRequest___0__System_Collections_Generic_IEnumerable___0__System_Func_C1_Web_Mvc_ColumnInfo_System_Collections_Generic_IEnumerable_System_Object___" data-uid="C1.Web.Mvc.CollectionViewHelper.Read``1(C1.Web.Mvc.CollectionViewRequest{``0},System.Collections.Generic.IEnumerable{``0},System.Func{C1.Web.Mvc.ColumnInfo,System.Collections.Generic.IEnumerable{System.Object}})">Read&lt;T&gt;(CollectionViewRequest&lt;T&gt;, IEnumerable&lt;T&gt;, Func&lt;ColumnInfo, IEnumerable&lt;object&gt;&gt;)</h4>
<div class="markdown level1 summary"><p>Reads data from the request and the source collection.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static CollectionViewResponse&lt;T&gt; Read&lt;T&gt;(CollectionViewRequest&lt;T&gt; requestData, IEnumerable&lt;T&gt; sourceCollection, Func&lt;ColumnInfo, IEnumerable&lt;object&gt;&gt; dataMapItemsSourceGetter = null)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function Read(Of T)(requestData As CollectionViewRequest(Of T), sourceCollection As IEnumerable(Of T), Optional dataMapItemsSourceGetter As Func(Of ColumnInfo, IEnumerable(Of Object)) = Nothing) As CollectionViewResponse(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="C1.Web.Mvc.CollectionViewRequest-1.html">CollectionViewRequest</a>&lt;T&gt;</td>
      <td><span class="parametername">requestData</span></td>
      <td><p>The request data</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a>&lt;T&gt;</td>
      <td><span class="parametername">sourceCollection</span></td>
      <td><p>The source collection</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-2">Func</a>&lt;<a class="xref" href="C1.Web.Mvc.ColumnInfo.html">ColumnInfo</a>, <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.object">object</a>&gt;&gt;</td>
      <td><span class="parametername">dataMapItemsSourceGetter</span></td>
      <td><p>The function to get the items source for the specified column's data map.</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="C1.Web.Mvc.CollectionViewResponse-1.html">CollectionViewResponse</a>&lt;T&gt;</td>
      <td><p>The response data</p>
</td>
    </tr>
  </tbody>
</table>
<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><p>The type of data record</p>
</td>
    </tr>
  </tbody>
</table>
</div>
