title: In explicit LINQ-to-SQL (C#) does order matter?
body: <p>I know Linq-to-SQL is dead, but anyway, I think this is really basic, I'm just confused about what magic Linq-to-SQL does and doesn't do with regards to the SQL it generates.</p>
  
  <p>If I have built up an Expression tree as "myPredicate", and have something like this:</p>
  
  <pre><code>(from request in DataContext.RequestsTable
  select request).Where(myPredicate)
                 .OrderByDescending(item =&gt; item.changeDate)
                 .Take(10)
  </code></pre>
  
  <p>is it going to work like the following SQL:</p>
  
  <pre><code>SELECT TOP 10 * FROM RequestsTable
  WHERE (&lt;&lt;myPredicate equivalent&gt;&gt;) 
  ORDER BY ChangeDate DESC 
  </code></pre>
  
  <p>It just seems weird to me because the ".Where()" comes after the "select" in my example code. Does the relative positioning of the "select" and "where()" and "orderby()" affect things?</p>
  
  <p>Alternatively, could I do it all in sql-esque syntax? For example, is there some way to use my WHERE predicate in the alternative syntax, something like this?</p>
  
  <pre><code>(from request in DataContext.RequestsTable
   where [somehow inject myPredicate]
   order by changeDate descending
   select request).Take(10)
  </code></pre>