LinqToQuerystring icon indicating copy to clipboard operation
LinqToQuerystring copied to clipboard

Entity Framework 6 QueryableExtensions

Open mpetito opened this issue 10 years ago • 5 comments

The LinqToQuerystring.EntityFramework library doesn't appear to work with EF6. When attempting to use $expand, I would get the following error:

Could not load type 'System.Data.Entity.DbExtensions' from assembly 'EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.

An assembly binding redirect doesn't work in this case because the Include extension method is now a member of System.Data.Entity.QueryableExtensions. Updating the nuget package to Entity Framework 6 and recompiling corrects the issue without any code changes. See commit mpetito/LinqToQuerystring@91198088733a3542a8a9a70238ff932bbadecc39

mpetito avatar Nov 23 '14 04:11 mpetito

Thanks for the tip, I'll make sure this gets included. It may require a new package specifically for EF 6.

beyond-code-github avatar Jan 06 '15 18:01 beyond-code-github

I just downloaded the code, updated from EF5 to EF6 and the $expand works like charm!

giespaepen avatar Jan 14 '15 16:01 giespaepen

+1

lemkepf avatar Feb 27 '15 23:02 lemkepf

+1!

cherrydev avatar Mar 19 '15 22:03 cherrydev

@giespaepen Works for me too!

@beyond-code-github Could you update the nuget package with this change? I rather have a dependency on your package than on a build of my local modifications...

Jogai avatar Jul 11 '16 07:07 Jogai