title: Casting IEnumerable to IList returns null
body: <p>I'm calling my repo with a code that returns an</p>
  
  <pre><code>IEnumerable&lt;MyEntity&gt;
  </code></pre>
  
  <p>And when I try to materialize the result it only works if I do .ToList() on the result, but if I try a </p>
  
  <pre><code>as IList&lt;MyEntity&gt;
  </code></pre>
  
  <p>It gives null. Shouldn't they produce the same result?</p>