# Microsoft.AspNetCore.Builder.DataProviderManagerExtensions.AddItemsSource

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="Microsoft_AspNetCore_Builder_DataProviderManagerExtensions_AddItemsSource_" data-uid="Microsoft.AspNetCore.Builder.DataProviderManagerExtensions.AddItemsSource*">AddItemsSource Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="Microsoft_AspNetCore_Builder_DataProviderManagerExtensions_AddItemsSource_" data-uid="Microsoft.AspNetCore.Builder.DataProviderManagerExtensions.AddItemsSource*"></a>
<h4 id="Microsoft_AspNetCore_Builder_DataProviderManagerExtensions_AddItemsSource_C1_Web_Api_Data_DataProviderManager_System_String_System_Collections_IEnumerable_" data-uid="Microsoft.AspNetCore.Builder.DataProviderManagerExtensions.AddItemsSource(C1.Web.Api.Data.DataProviderManager,System.String,System.Collections.IEnumerable)">AddItemsSource(DataProviderManager, string, IEnumerable)</h4>
<div class="markdown level1 summary"><p>Add an <a class="xref" href="C1.Web.Api.Data.ItemsSourceDataProvider.html">ItemsSourceDataProvider</a> with key and items.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static DataProviderManager AddItemsSource(this DataProviderManager manager, string key, IEnumerable items)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function AddItemsSource(manager As DataProviderManager, key As String, items As IEnumerable) As DataProviderManager</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.Api.Data.DataProviderManager.html">DataProviderManager</a></td>
      <td><span class="parametername">manager</span></td>
      <td><p>The <a class="xref" href="C1.Web.Api.Data.DataProviderManager.html">DataProviderManager</a>.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">key</span></td>
      <td><p>The key.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.ienumerable">IEnumerable</a></td>
      <td><span class="parametername">items</span></td>
      <td><p>The data source.</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.Api.Data.DataProviderManager.html">DataProviderManager</a></td>
      <td><p>The <a class="xref" href="C1.Web.Api.Data.DataProviderManager.html">DataProviderManager</a>.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="Microsoft_AspNetCore_Builder_DataProviderManagerExtensions_AddItemsSource_" data-uid="Microsoft.AspNetCore.Builder.DataProviderManagerExtensions.AddItemsSource*"></a>
<h4 id="Microsoft_AspNetCore_Builder_DataProviderManagerExtensions_AddItemsSource_C1_Web_Api_Data_DataProviderManager_System_String_System_Func_System_Collections_IEnumerable__" data-uid="Microsoft.AspNetCore.Builder.DataProviderManagerExtensions.AddItemsSource(C1.Web.Api.Data.DataProviderManager,System.String,System.Func{System.Collections.IEnumerable})">AddItemsSource(DataProviderManager, string, Func&lt;IEnumerable&gt;)</h4>
<div class="markdown level1 summary"><p>Add an <a class="xref" href="C1.Web.Api.Data.ItemsSourceDataProvider.html">ItemsSourceDataProvider</a> with key and items getter.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static DataProviderManager AddItemsSource(this DataProviderManager manager, string key, Func&lt;IEnumerable&gt; itemsGetter)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function AddItemsSource(manager As DataProviderManager, key As String, itemsGetter As Func(Of IEnumerable)) As DataProviderManager</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.Api.Data.DataProviderManager.html">DataProviderManager</a></td>
      <td><span class="parametername">manager</span></td>
      <td><p>The <a class="xref" href="C1.Web.Api.Data.DataProviderManager.html">DataProviderManager</a>.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">key</span></td>
      <td><p>The key.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-1">Func</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.ienumerable">IEnumerable</a>&gt;</td>
      <td><span class="parametername">itemsGetter</span></td>
      <td><p>The delegate of getting data source.</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.Api.Data.DataProviderManager.html">DataProviderManager</a></td>
      <td><p>The <a class="xref" href="C1.Web.Api.Data.DataProviderManager.html">DataProviderManager</a>.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
