title: How to union with a scalar value
body: <p>In this pseudo-code, the last line won't work because the scalar value isn't IQueryable.</p>
  
  <pre><code>var scalarValue = 7;
  
  var qry = (from t in db.Table
             where t.Filter == 5 //Arbitrary
             select t.ID);
  
  var unioned = qry.Union(scalarValue);
  </code></pre>
  
  <p>It's straightforward in SQL:</p>
  
  <pre><code>select t.ID
  from Table
  
  union
  
  select 7;
  </code></pre>
  
  <p>In my scenario I do need to select a valid Table.ID, so the workaround is:</p>
  
  <pre><code>var scalarValue = 7;
  
  var qry = (from t in db.Table
             where t.Filter == 5 //Arbitrary
             select t.ID);
  
  var scalarQry = (from t in db.Table
             where t.ID == scalarValue
             select t.ID);           
  
  var unioned = qry.Union(scalarQry);
  </code></pre>
  
  <p>However, if there is a way to output "select 7;" for example, then that's what I'm after for this question.</p>