Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is AsExpandable still necessary on EF Core? #100

Closed
brunosantosrhsenso opened this issue Aug 7, 2019 · 14 comments
Closed

Is AsExpandable still necessary on EF Core? #100

brunosantosrhsenso opened this issue Aug 7, 2019 · 14 comments

Comments

@brunosantosrhsenso
Copy link

When trying to convert a Core 2.2 web app (EF 2.2) to Core 3 (EF 3.0), AsExpandable was throwing an exception "Could not load file System.Interactive.Async". I then removed AsExpandable and the query (using predicatebuilder) seemed to work just fine. I did the same with the Core 2.2 version, and it also seemed to have worked properly. So now I'm wondering if I'm missing some feature by removing AsExpandable or if it's just not necessary anymore.

@StefH
Copy link
Collaborator

StefH commented Aug 8, 2019

Can you maybe create a example project to demonstrate this?

@StefH StefH changed the title Is AsExpandable sill necessary on EF Core? Is AsExpandable still necessary on EF Core? Sep 28, 2019
@joshmouch
Copy link

joshmouch commented Oct 1, 2019

I get this, too when I reference LinqKit.Microsoft.EntityFrameworkCore. I tried switching to LinqKit.Core, for for the hell of it, and then I started getting this error, instead:

The provider for the source IQueryable doesn't implement IAsyncQueryProvider. Only providers that implement IAsyncQueryProvider can be used for Entity Framework asynchronous operations.

@206mph
Copy link

206mph commented Oct 4, 2019

I am running into the same problem with AsExpandable after converting to Net Core 3. As brunosantosrhsenso mentioned, removing AsExpandable works but want to make sure that's correct.

@StefH
Copy link
Collaborator

StefH commented Oct 4, 2019

If you want to use async. Then you need the LinqKit version which references EF or EFCore.

See the table on main page from this project.

Using Expandable on net core 3 : I have to check...

@joshmouch
Copy link

joshmouch commented Oct 4, 2019

@StefH
You still do need to use it in at least one case that I've found. So I had to use LinqKit.Core and then not use Async at all as a work-around.

@StefH
Copy link
Collaborator

StefH commented Oct 5, 2019

@joshmouch and @206mph and @brunosantosrhsenso
New preview is uploaded on MyGet https://www.myget.org/F/linqkit/api/v3/index.json

--> LinqKit 1.1.17-preview-02 which works with EFCore 3.

Please test.

@mariusAF
Copy link

mariusAF commented Oct 7, 2019

Preview works - Thanks @StefH

@StefH
Copy link
Collaborator

StefH commented Nov 8, 2019

LinqKit 1.1.17-preview-04 is also uploaded to NuGet;
Please test.

@Armarr
Copy link

Armarr commented Nov 20, 2019

Can confirm that preview 04 also works

@StefH StefH added the question label Nov 26, 2019
@StefH
Copy link
Collaborator

StefH commented Nov 26, 2019

#103

@StefH StefH closed this as completed Nov 26, 2019
@StefH StefH added the feature label Nov 26, 2019
@Pao-lino
Copy link

Pao-lino commented Sep 28, 2021

@StefH
Excuse me, I'm on EF Core 5 and installed the LinqKit.Microsoft.EntityFrameworkCore package.
I'm using PredicateBuilder without AsExpandable and it's working.
It's not clear to me if AsExpandable is necessary or not.

@CesarD
Copy link

CesarD commented Jul 28, 2022

@StefH Excuse me, I'm on EF Core 5 and installed the LinqKit.Microsoft.EntityFrameworkCore package. I'm using PredicateBuilder without AsExpandable and it's working. It's not clear to me if AsExpandable is necessary or not.

Same for me. Doesn't seem to be needed anymore... Is it?

@ElectroBuddha
Copy link

I can also confirm that PredicateBuilder is working without .AsExpandable() in EntityFramework Core 7.

@n0099
Copy link

n0099 commented May 31, 2024

I can also confirm that PredicateBuilder is working without .AsExpandable() in EntityFramework Core 8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants