# C1.LiveLinq.LiveViews.View-1.SelectMany

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_LiveLinq_LiveViews_View_1_SelectMany_" data-uid="C1.LiveLinq.LiveViews.View`1.SelectMany*">SelectMany Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_LiveLinq_LiveViews_View_1_SelectMany_" data-uid="C1.LiveLinq.LiveViews.View`1.SelectMany*"></a>
<h4 id="C1_LiveLinq_LiveViews_View_1_SelectMany__2_System_Linq_Expressions_Expression_System_Func__0_C1_LiveLinq_IObservableSource___0____System_Linq_Expressions_Expression_System_Func__0___0___1___" data-uid="C1.LiveLinq.LiveViews.View`1.SelectMany``2(System.Linq.Expressions.Expression{System.Func{`0,C1.LiveLinq.IObservableSource{``0}}},System.Linq.Expressions.Expression{System.Func{`0,``0,``1}})">SelectMany&lt;TCollection, TResult&gt;(Expression&lt;Func&lt;T, IObservableSource&lt;TCollection&gt;&gt;&gt;, Expression&lt;Func&lt;T, TCollection, TResult&gt;&gt;)</h4>
<div class="markdown level1 summary"><p>Projects each element of this view to a collection of collections, flattens the resulting collections into one collection,
and invokes a result selector function on each element therein.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public View&lt;TResult&gt; SelectMany&lt;TCollection, TResult&gt;(Expression&lt;Func&lt;T, IObservableSource&lt;TCollection&gt;&gt;&gt; collectionSelector, Expression&lt;Func&lt;T, TCollection, TResult&gt;&gt; resultSelector)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function SelectMany(Of TCollection, TResult)(collectionSelector As Expression(Of Func(Of T, IObservableSource(Of TCollection))), resultSelector As Expression(Of Func(Of T, TCollection, TResult))) As View(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="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;T, <a class="xref" href="C1.LiveLinq.IObservableSource-1.html">IObservableSource</a>&lt;TCollection&gt;&gt;&gt;</td>
      <td><span class="parametername">collectionSelector</span></td>
      <td><p>A transform function to apply to each element of this view.</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;T, TCollection, TResult&gt;&gt;</td>
      <td><span class="parametername">resultSelector</span></td>
      <td><p>A transform function to apply to each element of the intermediate 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.LiveViews.View-1.html">View</a>&lt;TResult&gt;</td>
      <td><p>A view whose elements are the result of invoking the one-to-many transform function
<i>collectionSelector</i> on each element of this view and then mapping each of those collection elements and their
corresponding source element to a result element.</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">TCollection</span></td>
      <td><p>The type of the intermediate elements collected by <i>collectionSelector</i>.</p>
</td>
    </tr>
    <tr>
      <td><span class="parametername">TResult</span></td>
      <td><p>The type of the elements of the resulting view.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_LiveLinq_LiveViews_View_1_SelectMany_" data-uid="C1.LiveLinq.LiveViews.View`1.SelectMany*"></a>
<h4 id="C1_LiveLinq_LiveViews_View_1_SelectMany__1_System_Linq_Expressions_Expression_System_Func__0_C1_LiveLinq_IObservableSource___0____" data-uid="C1.LiveLinq.LiveViews.View`1.SelectMany``1(System.Linq.Expressions.Expression{System.Func{`0,C1.LiveLinq.IObservableSource{``0}}})">SelectMany&lt;TResult&gt;(Expression&lt;Func&lt;T, IObservableSource&lt;TResult&gt;&gt;&gt;)</h4>
<div class="markdown level1 summary"><p>Projects each element of this view to a collection of <i>TResult</i> and flattens the resulting collections into one view.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public View&lt;TResult&gt; SelectMany&lt;TResult&gt;(Expression&lt;Func&lt;T, IObservableSource&lt;TResult&gt;&gt;&gt; selector)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function SelectMany(Of TResult)(selector As Expression(Of Func(Of T, IObservableSource(Of TResult)))) As View(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="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;T, <a class="xref" href="C1.LiveLinq.IObservableSource-1.html">IObservableSource</a>&lt;TResult&gt;&gt;&gt;</td>
      <td><span class="parametername">selector</span></td>
      <td><p>A transform function to apply to each element.</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.LiveViews.View-1.html">View</a>&lt;TResult&gt;</td>
      <td><p>A view whose elements are the result of invoking the one-to-many transform function on each element of this view.</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">TResult</span></td>
      <td><p>The type of the elements of the resulting view.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
