title: Proper Way To Create Compiled Queries in 2019 Without Core
body: <p>I honestly did not think that this would be difficult to accomplish but I'm trying to figure out how to take an entity linq query and insert it into a compiled query command but for the life of me, I cannot figure it out. I've search high and low and there's a ton of stuff talking about .net Core, but I'm not using .net Core. </p>
  
  <p>Here's an example of my code that simply will not work.</p>
  
  <pre><code>var compiledQuery = CompiledQuery.Compile&lt;dbEntities, DateTime, IQueryable&lt;Transactions&gt;&gt; (((db,dateStamp) =&gt;
              db.Transactions.Where(x =&gt;
                  x.Ledger == 6 &amp;&amp; x.SubId != null &amp;&amp; x.Dated &lt; DbFunctions.AddDays(dateStamp, 1)));
  </code></pre>