# C1.LiveLinq.CompiledQuery

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="C1_LiveLinq_CompiledQuery" data-uid="C1.LiveLinq.CompiledQuery" class="text-break">CompiledQuery Class
</h1>
  <div class="markdown level0 summary"><p>Provides for compilation and cache of queries for reuse.</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">CompiledQuery</span></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="C1.LiveLinq.html">C1.LiveLinq</a></h6>
  <h6><strong>Assembly</strong>: C1.LiveLinq.4.8.dll</h6>
  <h5 id="C1_LiveLinq_CompiledQuery_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public static class CompiledQuery</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public Module CompiledQuery</code></pre>
  </div>
  <h5 id="C1_LiveLinq_CompiledQuery_remarks"><strong>Remarks</strong></h5>
  <div class="markdown level0 remarks"><p>If you need to execute the same query many times, each time with different parameter values,
use the <b>CompiledQuery</b> class to improve performance. Without it, every query execution includes a compilation stage,
that does not take much time but that time can accumulate to significant numbers if it is repeated many times.
The <b>CompiledQuery</b> class contains a single <b>Compile</b> method with several overloads.
Call the <b>Compile</b> method to create a delegate to represent the compiled query.</p>
</div>
  <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_LiveLinq_CompiledQuery_Compile__2_System_Linq_Expressions_Expression_System_Func___0_C1_LiveLinq_Indexing_IIndexedSource___1____" data-uid="C1.LiveLinq.CompiledQuery.Compile``2(System.Linq.Expressions.Expression{System.Func{``0,C1.LiveLinq.Indexing.IIndexedSource{``1}}})">
          <a class="xref" href="C1.LiveLinq.CompiledQuery.Compile.html#C1_LiveLinq_CompiledQuery_Compile__2_System_Linq_Expressions_Expression_System_Func___0_C1_LiveLinq_Indexing_IIndexedSource___1____">Compile&lt;T, TResult&gt;(Expression&lt;Func&lt;T, IIndexedSource&lt;TResult&gt;&gt;&gt;)</a>
        </td>
        <td class="markdown level1 summary"><p>Compiles the query.</p>
</td>
      </tr>
      <tr>
        <td id="C1_LiveLinq_CompiledQuery_Compile__3_System_Linq_Expressions_Expression_System_Func___0___1_C1_LiveLinq_Indexing_IIndexedSource___2____" data-uid="C1.LiveLinq.CompiledQuery.Compile``3(System.Linq.Expressions.Expression{System.Func{``0,``1,C1.LiveLinq.Indexing.IIndexedSource{``2}}})">
          <a class="xref" href="C1.LiveLinq.CompiledQuery.Compile.html#C1_LiveLinq_CompiledQuery_Compile__3_System_Linq_Expressions_Expression_System_Func___0___1_C1_LiveLinq_Indexing_IIndexedSource___2____">Compile&lt;T1, T2, TResult&gt;(Expression&lt;Func&lt;T1, T2, IIndexedSource&lt;TResult&gt;&gt;&gt;)</a>
        </td>
        <td class="markdown level1 summary"><p>Compiles the query.</p>
</td>
      </tr>
      <tr>
        <td id="C1_LiveLinq_CompiledQuery_Compile__4_System_Linq_Expressions_Expression_System_Func___0___1___2_C1_LiveLinq_Indexing_IIndexedSource___3____" data-uid="C1.LiveLinq.CompiledQuery.Compile``4(System.Linq.Expressions.Expression{System.Func{``0,``1,``2,C1.LiveLinq.Indexing.IIndexedSource{``3}}})">
          <a class="xref" href="C1.LiveLinq.CompiledQuery.Compile.html#C1_LiveLinq_CompiledQuery_Compile__4_System_Linq_Expressions_Expression_System_Func___0___1___2_C1_LiveLinq_Indexing_IIndexedSource___3____">Compile&lt;T1, T2, T3, TResult&gt;(Expression&lt;Func&lt;T1, T2, T3, IIndexedSource&lt;TResult&gt;&gt;&gt;)</a>
        </td>
        <td class="markdown level1 summary"><p>Compiles the query.</p>
</td>
      </tr>
      <tr>
        <td id="C1_LiveLinq_CompiledQuery_Compile__5_System_Linq_Expressions_Expression_System_Func___0___1___2___3_C1_LiveLinq_Indexing_IIndexedSource___4____" data-uid="C1.LiveLinq.CompiledQuery.Compile``5(System.Linq.Expressions.Expression{System.Func{``0,``1,``2,``3,C1.LiveLinq.Indexing.IIndexedSource{``4}}})">
          <a class="xref" href="C1.LiveLinq.CompiledQuery.Compile.html#C1_LiveLinq_CompiledQuery_Compile__5_System_Linq_Expressions_Expression_System_Func___0___1___2___3_C1_LiveLinq_Indexing_IIndexedSource___4____">Compile&lt;T1, T2, T3, T4, TResult&gt;(Expression&lt;Func&lt;T1, T2, T3, T4, IIndexedSource&lt;TResult&gt;&gt;&gt;)</a>
        </td>
        <td class="markdown level1 summary"><p>Compiles the query.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
