title: Stuck with an query that getting async error
body: <p>I have a controller wich contains follows:</p>
  
  <pre><code>List&lt;Game&gt; gamesRat = new List&lt;Game&gt;();
          if (selectedRating.Count() != 0)//User select any checkboxes
          {
              FilterGamesByRating(gamesRat, selectedRating, "Shooter");//Filter by user inputs
              my = true;//Boolean
          }
  </code></pre>
  
  <p>So the my question is:
  when i try to return a View: </p>
  
  <pre><code>return View(await PaginatedList&lt;Game&gt;.CreateAsync(gamesRat.AsQueryable(), page ?? 1, pSize));
  </code></pre>
  
  <p>I get the following error:</p>
  
  <blockquote>
    <p>The provider for the source IQueryable doesn't implement IAsyncQueryProvider. Only providers that implement IEntityQueryProvider can be used for Entity Framework asynchronous operations</p>
  </blockquote>
  
  <p>But when in other method, i put that query:</p>
  
  <pre><code>IQueryable&lt;Game&gt; games = _context.Games.Where(x =&gt; x.Category == "Shooter");
  return View(await PaginatedList&lt;Game&gt;.CreateAsync(games, page ?? 1, pSize));
  </code></pre>
  
  <p>It works perfectly. How can i fix that error? Thanks.</p>
  
  <p>Of course, my PaginatedList method:</p>
  
  <pre><code>public class PaginatedList&lt;T&gt; : List&lt;T&gt;
      {
          public int PageIndex { get; private set; }
          public int TotalPages { get; private set; }
          public PaginatedList(List&lt;T&gt; items, int count, int pageIndex, int pageSize)
          {
              PageIndex = pageIndex;
              TotalPages = (int)Math.Ceiling(count / (double)pageSize);
  
              this.AddRange(items);
          }
  
          public bool HasPreviousPage
          {
              get
              {
                  return (PageIndex &gt; 1);
              }
          }
  
          public bool HasNextPage
          {
              get
              {
                  return (PageIndex &lt; TotalPages);
              }
          }
  
          public static async Task&lt;PaginatedList&lt;T&gt;&gt; CreateAsync(IQueryable&lt;T&gt; source, int pageIndex, int pageSize)
          {
              var count = await source.CountAsync();
              var items = await source.Skip((pageIndex - 1) * pageSize).Take(pageSize).ToListAsync();
              return new PaginatedList&lt;T&gt;(items, count, pageIndex, pageSize);
          }
      }
  </code></pre>