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

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="C1_Web_Mvc_Fluent_ServiceBuilder_2" data-uid="C1.Web.Mvc.Fluent.ServiceBuilder`2" class="text-break">ServiceBuilder&lt;TControl, TBuilder&gt; Class
</h1>
  <div class="markdown level0 summary"><p>Defines a builder to configurate <span class="xref">C1.Web.Mvc.Service</span>.</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;TControl, TBuilder&gt;</div>
    <div class="level3"><a class="xref" href="C1.Web.Mvc.Fluent.ComponentBuilder-2.html">ComponentBuilder</a>&lt;TControl, TBuilder&gt;</div>
    <div class="level4"><span class="xref">ServiceBuilder&lt;TControl, TBuilder&gt;</span></div>
      <div class="level5"><a class="xref" href="C1.Web.Mvc.Fluent.BaseCollectionViewServiceBuilder-3.html">BaseCollectionViewServiceBuilder&lt;T, TControl, TBuilder&gt;</a></div>
      <div class="level5"><a class="xref" href="C1.Web.Mvc.Fluent.LayoutBaseBuilder-2.html">LayoutBaseBuilder&lt;TControl, TBuilder&gt;</a></div>
  </div>
  <div class="implements">
    <h5>Implements</h5>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/microsoft.aspnetcore.html.ihtmlcontent">IHtmlContent</a></div>
    <div><a class="xref" href="C1.Web.Mvc.Fluent.ITemplateBuilder-1.html">ITemplateBuilder</a>&lt;TBuilder&gt;</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_ServiceBuilder_2_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public abstract class ServiceBuilder&lt;TControl, TBuilder&gt; : ComponentBuilder&lt;TControl, TBuilder&gt;, IHtmlContent, ITemplateBuilder&lt;TBuilder&gt; where TControl : Service where TBuilder : ServiceBuilder&lt;TControl, TBuilder&gt;</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public MustInherit Class ServiceBuilder(Of TControl As Service, TBuilder As ServiceBuilder(Of TControl, TBuilder))
    Inherits ComponentBuilder(Of TControl, TBuilder)
    Implements IHtmlContent, ITemplateBuilder(Of TBuilder)</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">TControl</span></td>
        <td></td>
      </tr>
      <tr>
        <td><span class="parametername">TBuilder</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_Web_Mvc_Fluent_ServiceBuilder_2__ctor__0_" data-uid="C1.Web.Mvc.Fluent.ServiceBuilder`2.#ctor(`0)">
          <a class="xref" href="C1.Web.Mvc.Fluent.ServiceBuilder-2.-ctor.html#C1_Web_Mvc_Fluent_ServiceBuilder_2__ctor__0_">ServiceBuilder(TControl)</a>
        </td>
        <td class="markdown level1 summary"><p>Creates one <a class="xref" href="C1.Web.Mvc.Fluent.ServiceBuilder-2.html">ServiceBuilder&lt;TControl, TBuilder&gt;</a> instance to configurate <code class="paramref">service</code>.</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_ServiceBuilder_2_Id_System_String_" data-uid="C1.Web.Mvc.Fluent.ServiceBuilder`2.Id(System.String)">
          <a class="xref" href="C1.Web.Mvc.Fluent.ServiceBuilder-2.Id.html#C1_Web_Mvc_Fluent_ServiceBuilder_2_Id_System_String_">Id(string)</a>
        </td>
        <td class="markdown level1 summary"><p>Configurates <a class="xref" href="C1.Web.Mvc.Component.Id.html#C1_Web_Mvc_Component_Id">Id</a>.
Sets the id of the service.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Web_Mvc_Fluent_ServiceBuilder_2_TemplateBind_System_String_System_String_" data-uid="C1.Web.Mvc.Fluent.ServiceBuilder`2.TemplateBind(System.String,System.String)">
          <a class="xref" href="C1.Web.Mvc.Fluent.ServiceBuilder-2.TemplateBind.html#C1_Web_Mvc_Fluent_ServiceBuilder_2_TemplateBind_System_String_System_String_">TemplateBind(string, string)</a>
        </td>
        <td class="markdown level1 summary"><p>When the builder works in template mode, bind the property which name is specified
to some item which name is specified.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Web_Mvc_Fluent_ServiceBuilder_2_ToTemplate" data-uid="C1.Web.Mvc.Fluent.ServiceBuilder`2.ToTemplate">
          <a class="xref" href="C1.Web.Mvc.Fluent.ServiceBuilder-2.ToTemplate.html#C1_Web_Mvc_Fluent_ServiceBuilder_2_ToTemplate">ToTemplate()</a>
        </td>
        <td class="markdown level1 summary"><p>Transfers current builder to template mode.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
