title: EF. How to union tables, sort rows, and get top entities?
body: <p>I want to union records from 2 tables, sort them, and read TOP rows from result set. </p>
  
  <pre><code>T1
  --------
  Id, Timestamp, Text1
  
  T2
  --------
  Id, Timestamp, Text2
  </code></pre>
  
  <p>With SQL it can be done this way:</p>
  
  <pre><code>SELECT TOP 10 * FROM
  (
      SELECT 
          [Timestamp], 
          [Text1] 
  
      FROM 
          T1
  
      UNION
  
      SELECT 
          [Timestamp], 
          [Text2]
  
      FROM 
          T2
  ) as x
  
  ORDER BY [Timestamp]
  </code></pre>
  
  <p><strong>Q:</strong> How can I do that task using EF linq?</p>