# C1.Web.Mvc.Fluent.ListItemFactory-2

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="C1_Web_Mvc_Fluent_ListItemFactory_2" data-uid="C1.Web.Mvc.Fluent.ListItemFactory`2" class="text-break">ListItemFactory&lt;TItem, TItemBuilder&gt; Class
</h1>
  <div class="markdown level0 summary"><p>Define a class used to build a strongly typed list of objects.</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"><span class="xref">HideObjectMembers</span></div>
    <div class="level2"><a class="xref" href="C1.Web.Mvc.Fluent.BaseBuilder-2.html">BaseBuilder</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ilist-1">IList</a>&lt;TItem&gt;, <a class="xref" href="C1.Web.Mvc.Fluent.ListItemFactory-2.html">ListItemFactory</a>&lt;TItem, TItemBuilder&gt;&gt;</div>
    <div class="level3"><span class="xref">ListItemFactory&lt;TItem, TItemBuilder&gt;</span></div>
      <div class="level4"><a class="xref" href="C1.Web.Mvc.Fluent.ColumnFiltersBuilder.html">ColumnFiltersBuilder</a></div>
      <div class="level4"><a class="xref" href="C1.Web.Mvc.Fluent.MenuItemFactory.html">MenuItemFactory</a></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="C1.Web.Mvc.Fluent.html">C1.Web.Mvc.Fluent</a></h6>
  <h6><strong>Assembly</strong>: C1.AspNetCore.Mvc.dll</h6>
  <h5 id="C1_Web_Mvc_Fluent_ListItemFactory_2_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public class ListItemFactory&lt;TItem, TItemBuilder&gt; : BaseBuilder&lt;IList&lt;TItem&gt;, ListItemFactory&lt;TItem, TItemBuilder&gt;&gt; where TItem : class, new() where TItemBuilder : BaseBuilder&lt;TItem, TItemBuilder&gt;</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public Class ListItemFactory(Of TItem As {Class, New}, TItemBuilder As BaseBuilder(Of TItem, TItemBuilder))
    Inherits BaseBuilder(Of IList(Of TItem), ListItemFactory(Of TItem, TItemBuilder))</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">TItem</span></td>
        <td><p>The specified type of the item</p>
</td>
      </tr>
      <tr>
        <td><span class="parametername">TItemBuilder</span></td>
        <td><p>The specified type of the item builder.</p>
</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_Web_Mvc_Fluent_ListItemFactory_2__ctor_System_Collections_Generic_IList__0__System_Func__0__1__" data-uid="C1.Web.Mvc.Fluent.ListItemFactory`2.#ctor(System.Collections.Generic.IList{`0},System.Func{`0,`1})">
          <a class="xref" href="C1.Web.Mvc.Fluent.ListItemFactory-2.-ctor.html#C1_Web_Mvc_Fluent_ListItemFactory_2__ctor_System_Collections_Generic_IList__0__System_Func__0__1__">ListItemFactory(IList&lt;TItem&gt;, Func&lt;TItem, TItemBuilder&gt;)</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes an instance of the <a class="xref" href="C1.Web.Mvc.Fluent.ListItemFactory-2.html">ListItemFactory&lt;TItem, TItemBuilder&gt;</a> class
by using the specified collection.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Web_Mvc_Fluent_ListItemFactory_2__ctor_System_Collections_Generic_IList__0__System_Func__0__System_Func__0__1__" data-uid="C1.Web.Mvc.Fluent.ListItemFactory`2.#ctor(System.Collections.Generic.IList{`0},System.Func{`0},System.Func{`0,`1})">
          <a class="xref" href="C1.Web.Mvc.Fluent.ListItemFactory-2.-ctor.html#C1_Web_Mvc_Fluent_ListItemFactory_2__ctor_System_Collections_Generic_IList__0__System_Func__0__System_Func__0__1__">ListItemFactory(IList&lt;TItem&gt;, Func&lt;TItem&gt;, Func&lt;TItem, TItemBuilder&gt;)</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes an instance of the <a class="xref" href="C1.Web.Mvc.Fluent.ListItemFactory-2.html">ListItemFactory&lt;TItem, TItemBuilder&gt;</a> class
by using the specified collection.</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_Web_Mvc_Fluent_ListItemFactory_2_Add" data-uid="C1.Web.Mvc.Fluent.ListItemFactory`2.Add">
          <a class="xref" href="C1.Web.Mvc.Fluent.ListItemFactory-2.Add.html#C1_Web_Mvc_Fluent_ListItemFactory_2_Add">Add()</a>
        </td>
        <td class="markdown level1 summary"><p>Add a default TItem instance to the collection.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Web_Mvc_Fluent_ListItemFactory_2_Add_System_Action__1__" data-uid="C1.Web.Mvc.Fluent.ListItemFactory`2.Add(System.Action{`1})">
          <a class="xref" href="C1.Web.Mvc.Fluent.ListItemFactory-2.Add.html#C1_Web_Mvc_Fluent_ListItemFactory_2_Add_System_Action__1__">Add(Action&lt;TItemBuilder&gt;)</a>
        </td>
        <td class="markdown level1 summary"><p>Add a TItem instance updated by the specified action to the collection.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Web_Mvc_Fluent_ListItemFactory_2_Add__0_" data-uid="C1.Web.Mvc.Fluent.ListItemFactory`2.Add(`0)">
          <a class="xref" href="C1.Web.Mvc.Fluent.ListItemFactory-2.Add.html#C1_Web_Mvc_Fluent_ListItemFactory_2_Add__0_">Add(TItem)</a>
        </td>
        <td class="markdown level1 summary"><p>Add a TItem instance to the collection.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
