Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

LinqKit and async in Entity Framework

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" />
like image 881
Bryan Avatar asked Mar 09 '16 22:03

Bryan


1 Answers

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)

like image 82
Brett Veenstra Avatar answered Oct 04 '22 09:10

Brett Veenstra