# C1.LiveLinq.IndexedQueryExtensions.GroupJoin

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_LiveLinq_IndexedQueryExtensions_GroupJoin_" data-uid="C1.LiveLinq.IndexedQueryExtensions.GroupJoin*">GroupJoin Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_LiveLinq_IndexedQueryExtensions_GroupJoin_" data-uid="C1.LiveLinq.IndexedQueryExtensions.GroupJoin*"></a>
<h4 id="C1_LiveLinq_IndexedQueryExtensions_GroupJoin__4_C1_LiveLinq_Indexing_IIndexedSource___0__System_Collections_Generic_IEnumerable___1__System_Linq_Expressions_Expression_System_Func___0___2___System_Linq_Expressions_Expression_System_Func___1___2___System_Linq_Expressions_Expression_System_Func___0_System_Collections_Generic_IEnumerable___1____3___" data-uid="C1.LiveLinq.IndexedQueryExtensions.GroupJoin``4(C1.LiveLinq.Indexing.IIndexedSource{``0},System.Collections.Generic.IEnumerable{``1},System.Linq.Expressions.Expression{System.Func{``0,``2}},System.Linq.Expressions.Expression{System.Func{``1,``2}},System.Linq.Expressions.Expression{System.Func{``0,System.Collections.Generic.IEnumerable{``1},``3}})">GroupJoin&lt;TOuter, TInner, TKey, TResult&gt;(IIndexedSource&lt;TOuter&gt;, IEnumerable&lt;TInner&gt;, Expression&lt;Func&lt;TOuter, TKey&gt;&gt;, Expression&lt;Func&lt;TInner, TKey&gt;&gt;, Expression&lt;Func&lt;TOuter, IEnumerable&lt;TInner&gt;, TResult&gt;&gt;)</h4>
<div class="markdown level1 summary"><p>Correlates the elements of two collections based on equality of keys and groups the results.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static IIndexedSource&lt;TResult&gt; GroupJoin&lt;TOuter, TInner, TKey, TResult&gt;(this IIndexedSource&lt;TOuter&gt; outer, IEnumerable&lt;TInner&gt; inner, Expression&lt;Func&lt;TOuter, TKey&gt;&gt; outerKeySelector, Expression&lt;Func&lt;TInner, TKey&gt;&gt; innerKeySelector, Expression&lt;Func&lt;TOuter, IEnumerable&lt;TInner&gt;, TResult&gt;&gt; resultSelector)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function GroupJoin(Of TOuter, TInner, TKey, TResult)(outer As IIndexedSource(Of TOuter), inner As IEnumerable(Of TInner), outerKeySelector As Expression(Of Func(Of TOuter, TKey)), innerKeySelector As Expression(Of Func(Of TInner, TKey)), resultSelector As Expression(Of Func(Of TOuter, IEnumerable(Of TInner), TResult))) As IIndexedSource(Of TResult)</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.LiveLinq.Indexing.IIndexedSource-1.html">IIndexedSource</a>&lt;TOuter&gt;</td>
      <td><span class="parametername">outer</span></td>
      <td><p>The first collection to join.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a>&lt;TInner&gt;</td>
      <td><span class="parametername">inner</span></td>
      <td><p>The collection to join to the first collection.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.linq.expressions.expression-1">Expression</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-2">Func</a>&lt;TOuter, TKey&gt;&gt;</td>
      <td><span class="parametername">outerKeySelector</span></td>
      <td><p>A function to extract the join key from each element of the first collection.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.linq.expressions.expression-1">Expression</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-2">Func</a>&lt;TInner, TKey&gt;&gt;</td>
      <td><span class="parametername">innerKeySelector</span></td>
      <td><p>A function to extract the join key from each element of the second collection.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.linq.expressions.expression-1">Expression</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-3">Func</a>&lt;TOuter, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a>&lt;TInner&gt;, TResult&gt;&gt;</td>
      <td><span class="parametername">resultSelector</span></td>
      <td><p>A function to create a result element from an element
from the first collection and a collection of matching elements from the second collection.</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.LiveLinq.Indexing.IIndexedSource-1.html">IIndexedSource</a>&lt;TResult&gt;</td>
      <td><p>An <a class="xref" href="C1.LiveLinq.Indexing.IIndexedSource-1.html">IIndexedSource&lt;TResult&gt;</a> that contains elements of type <i>TResult</i>
that are obtained by performing a grouped join on two collections.</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">TOuter</span></td>
      <td><p>The type of the elements of the first collection.</p>
</td>
    </tr>
    <tr>
      <td><span class="parametername">TInner</span></td>
      <td><p>The type of the elements of the second collection.</p>
</td>
    </tr>
    <tr>
      <td><span class="parametername">TKey</span></td>
      <td><p>The type of the keys returned by the key selector functions.</p>
</td>
    </tr>
    <tr>
      <td><span class="parametername">TResult</span></td>
      <td><p>The type of the result elements.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
