title: LINQ how to translate subquery in FROM clause
body: <p>Newb to C#.Net / LINQ<br>
  I have to convert some dynamic stored procs to LINQ.  I'm new to LINQ, and looking for an example to follow.  I have something like the following:</p>
  
  <pre><code>sql1 VARCHAR2(32000)  := ' SELECT a,b,c FROM ( ';
  from1 VARCHAR2(32000) := ' SELECT x,y,z FROM t1, t2,
                                 (SELECT xx FROM aTable WHERE foo = 'bar' )
                              WHERE x=1
                                AND y=2';
  </code></pre>
  
  <p>Anyway, hope this gets the example across.<br>
  I was hoping to do something like:</p>
  
  <pre><code>var subSelect1 = (from val1 in aTable
                   where  val1.foo = "bar"
                   select new {
                       val1.foobar
                   }).AsEnumerable();
  
  var mainSelect = (from &lt;how do I use the subSelect1 as a virtual table here?&gt;
  </code></pre>
  
  <p>Is this possible in LINQ?</p>
  
  <p>The actual query is quite long and complex...having several subqueries in the FROM clause of the main select, and some of the subqueries in the FROM have themselves nested subqueries in -their- FROM clause. </p>