12

I am getting the following error when using the predicate builder with Entity Framework Core.

The source IQueryable doesn't implement IAsyncEnumerable. Only sources that implement IAsyncEnumerable can be used for Entity Framework asynchronous operations.

This is the code -

 List<Member> results = await _context.Members.AsExpandable().Where(predicate).ToListAsync();

This the exact version of EF I'm using

  <package id="EntityFramework.Core" version="7.0.0-rc1-final" targetFramework="net451" />
Bryan
  • 5,065
  • 10
  • 51
  • 68

1 Answers1

8

This is supported in a different Nuget package than normal LinqKit.

See: https://www.nuget.org/packages/LinqKit.Microsoft.EntityFrameworkCore/

(for non-Core see https://www.nuget.org/packages/LinqKit.EntityFramework)

Brett Veenstra
  • 47,674
  • 18
  • 70
  • 86
  • Thanks for the tip, but it looks like very new package, don't think I want to use it on a production system just yet. – Bryan Jul 27 '16 at 18:53
  • @Bryan AFAIK, the existing LinqKit maintainers just split their packages... you can use an older version of LinqKit package if it makes you feel better: https://www.nuget.org/packages/LinqKit/1.1.3.1 – Brett Veenstra Jul 27 '16 at 18:55
  • Yes the LinqKit.EntityFramework is the old LinqKit and the reason was that people wanted the EF dependency away. – Tuomas Hietanen Aug 31 '16 at 23:53