scottksmith95/LINQKit

Support .NET Core 3

Enngage opened this issue ยท 19 comments

Thanks for the awesome lib! I've been using it with great success in my app thus far.

I'm in a process of migration to .NET Core 3 where simply calling AsExpandable throws Exception:

var query = AppDbContext.Logs.AsExpandable();
Method 'ExecuteAsync' in type 'LinqKit.ExpandableQueryProvider`1' from assembly 'LinqKit.Microsoft.EntityFrameworkCore, Version=1.1.16.0, Culture=neutral, PublicKeyToken=a5e68054d5e7f94b' does not have an implementation.

Is there something I'm missing or was there indeed some change in .NET Core 3 & EF 3 which is not yet supported?

EF Core 3.0 is getting some "small" changes...
https://github.com/aspnet/EntityFrameworkCore/issues?q=label%3Aproviders-beware

Basicly the whole query processing bit is getting a near total rewrite.
For the better. https://github.com/aspnet/EntityFrameworkCore/issues?q=label%3Arelinq-dependent

This is a valid in issue now when the stable versions have been released

I'm getting compiler errors when trying to build a Xamarin Forms UWP app using the latest stable release of EFCore and .NET Core 3.1. I assume this is the same issue? See the attached file for details pointing to LinqKit and EntityFrameworkCore.

Linqkit EFCore 3 Issue.txt

hi there, is there any estimate when we can expect support for .Net Core 3.x?

Hello @alexander-karnadi, I think this was already addressed, we are using it in one project which runs on 3.1. But I can not check if that is true right now.

Based on the nuget there was a new version released 1 month ago, which I believe was fixint this

Hello @alexander-karnadi, I think this was already addressed, we are using it in one project which runs on 3.1. But I can not check if that is true right now.

Based on the nuget there was a new version released 1 month ago, which I believe was fixint this

Hello @zdarovka . I have just updated one of our projects and the issue is still here

StefH commented

@alnintex Can you provide a full working example please?

@zdarovka Well my example is similar to the first one provided here
Context.Documents.AsExpandable()

and it throws the error:
System.TypeLoadException: 'Method 'ExecuteAsync' in type 'LinqKit.ExpandableQueryProvider'1' from assembly 'LinqKit.Microsoft.EntityFrameworkCore, Version=1.1.17.0, Culture=neutral, PublicKeyToken=a5e68054d5e7f94b' does not have an implementation.'

Further technical details
EF Core version: 3.1.1
Target framework: .Net Full Framework 4.7.2 + Net Standard 2.0
Operating system: Windows 10 Pro (Version 1909)
IDE: Visual Studio 2019 16.4.3

StefH commented

@alnintex and @zdarovka
I did add a console app to "examples/ConsoleAppNetCore3Ef3". That one works.
Can you please check the differences with your project ?

@alnintex and @zdarovka
I did add a console app to "examples/ConsoleAppNetCore3Ef3". That one works.
Can you please check the differences with your project ?

First of all, thank you @StefH for coming back and helping us, I appreciate!

Your example works ok however we have different combinations of frameworks. EF Core configuration (entities, context, etc) lives in NetStandard 2.0 project, while the main project targets Net Framework 4.7.2. I created a couple of projects (ConsoleAppNet472, ClassLibraryStandard20) in examples to reproduce the bug (a little bit different error as what we have in our code, but I guess, the solution will be the same). Also, we don't have this problem when using EF Core 2.2.

Looks like LinqKit expected some dependencies to be installed.

P.S.
I might be wrong when I started this discussion under Net Core 3 topic, I feel this issue is more about Net 4.7.2 + EF Core 3.1 + NetStandard 2.0.

StefH commented

@alnintex I understand your issue, I've created a new issue with a proposal: #114

Can you comment?

StefH commented

@alnintex
Can you try
LinqKit.Microsoft.EntityFrameworkCore 3.0.0-preview-01 from MyGet ?

LinqKit.Microsoft.EntityFrameworkCore 3.0.0-preview-01

@StefH could you let me know the feed or explain please how to connect to myget?

StefH commented

To get this working, I need to make 3 versions from this NuGet, can you take a look at:
#114

And provide your comments please?

StefH commented

@alnintex Thanks for updating the Wiki, however how could you do that ?

@alnintex Thanks for updating the Wiki, however how could you do that ?

Just clicked Edit button, maybe you need to configure some permissions?