title: Linq-to-entities to normal linq
body: <p>I have this line of linq</p>
  <pre class="lang-cs prettyprint-override"><code>_cache = _repository.EntitiesNoTracking().Select(k =&gt; Crypto.DecryptString(k.KeyValue)).ToHashSet();
  </code></pre>
  <p>This of course doesn't work, as Linq-to-entities doens't know <code>Crypto.DecryptString</code>.
  So the solution could be</p>
  <pre class="lang-cs prettyprint-override"><code>_cache = _repository.EntitiesNoTracking().ToArray().Select(k =&gt; Crypto.DecryptString(k.KeyValue)).ToHashSet();
  </code></pre>
  <p>However, this seems to have a redundant <code>ToArray()</code> in there.
  I supposed the next code would be more efficient:</p>
  <pre class="lang-cs prettyprint-override"><code>var _cache = new HashSet&lt;string&gt;();
  foreach(var item in _repository.EntitiesNoTracking()){
      _cache.Add(Crypto.DecryptString(item.KeyValue));
  }
  </code></pre>
  <p>Isn't there some way of telling Linq-to-entities to convert to normal linq, without the extra step?</p>