title: IQueryable doesn't implement IDbAsyncEnumerable
body: <p>The question was originally asked at <a href="http://entityframework.codeplex.com/discussions/399499#post928179" rel="noreferrer">http://entityframework.codeplex.com/discussions/399499#post928179</a> .</p>
  
  <p>Good day! Please tell me if it is wrong place to post this question.</p>
  
  <p>I have a query as follows:</p>
  
  <pre><code>IQueryable&lt;Card&gt; cardsQuery =
    dataContext.Cards
    .Where(predicate)
    .OrderByDescending(kc =&gt; kc.SendDate)
    .AsQueryable();
  </code></pre>
  
  <p>Then I try:</p>
  
  <p><code>
  Task&lt;Card[]&gt; result = cardsQuery.ToArrayAsync();
  </code></p>
  
  <p>And then exception rises:</p>
  
  <p><code>The source IQueryable doesn't implement IDbAsyncEnumerable&lt;Models.Card&gt;</code></p>
  
  <p>I use modified version of 'EF 5.x DbCotext generator'.</p>
  
  <p>How to avoid it?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>Important remark is that I have method to produce <code>IQuerayble&lt;Card&gt;</code> as follows:</p>
  
  <pre><code>class Repository {
    public IQueryable&lt;Card&gt; GetKudosCards(Func&lt;Card, bool&gt; predicate) {
      IEnumerable&lt;KudosCard&gt; kudosCards = kudosCardsQuery.Where(predicate);
       return kudosCards
              .OrderByDescending(kc =&gt; kc.SendDate)
              .AsQueryable();
    }
  }
  </code></pre>