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

System.Linq.Queryable breaking changes in .NET 6 #493

Closed
eiriktsarpalis opened this issue Mar 29, 2021 · 17 comments
Closed

System.Linq.Queryable breaking changes in .NET 6 #493

eiriktsarpalis opened this issue Mar 29, 2021 · 17 comments
Assignees
Labels

Comments

@eiriktsarpalis
Copy link

Hi, I'm the area owner for System.Linq in the .NET libraries team. As part of our efforts to improve LINQ in .NET 6 we have added a small number of method overloads to the queryable APIs. This is known to break query providers whose reflection code does not account for method overloading. I have filed a breaking change issue which contains instructions on how to mitigate the problem.

I'm contacting you directly since we have received reports that your nuget package System.Linq.Dynamic.Core is also affected by this change.

@StefH StefH added the bug label Mar 29, 2021
@StefH StefH self-assigned this Mar 29, 2021
@StefH
Copy link
Collaborator

StefH commented Mar 29, 2021

Hello @eiriktsarpalis, thanks for notifying these changes.

Can you give an ETA when these changes will be published to .NET 6 ?

BTW: I need to read all the information you provided to assess the changes required in this project.

@eiriktsarpalis
Copy link
Author

Hi @StefH, some of these changes can already be found in .NET 6 preview 2.

@StefH StefH added feature and removed bug labels Mar 29, 2021
@StefH
Copy link
Collaborator

StefH commented Jun 1, 2021

Preview versions for EF 6 are available on NuGet.

@wihrl
Copy link

wihrl commented Jul 27, 2021

How extensive are the changes necessary to fix this? Can I expect a fix anytime soon?

I ended up having to downgrade a project back to .NET 5 because of this.

@StefH
Copy link
Collaborator

StefH commented Jul 27, 2021

@wihrl and @enchev

What version from System.Linq.Dynamic.Core did you use?
(Note that there is a https://www.nuget.org/packages/Microsoft.EntityFrameworkCore.DynamicLinq - 6.2.11-preview.4.21253.1)

@wihrl
Copy link

wihrl commented Jul 27, 2021

I used 1.2.11.
I cannot install the Microsoft.EntityFrameworkCore.DynamicLinq package as it requires EF Core 6, but I'm using 3.1.17 and cannot upgrade because of other packages.

Here is the error I'm getting:
image

I believe that a dynamic .Where call on an IQueryable is causing it. It works fine in .NET 5.

@StefH
Copy link
Collaborator

StefH commented Jul 27, 2021

@wihrl
Now I understand.

This is about .NET 6, and not about EF 6.

I'll look into this.

@tirth-uhn
Copy link

Hi - we've also run into this issue using Radzen.Blazor with .NET 6 preview, it's described on the Radzen forums which actually references this issue.

@StefH
Copy link
Collaborator

StefH commented Jul 28, 2021

@wihrl
@tirth-uhn

Please try version 1.2.12-preview-01 from MyGet:
https://www.myget.org/feed/system-linq-dynamic-core/package/nuget/System.Linq.Dynamic.Core

@sofiageo
Copy link

sofiageo commented Jul 28, 2021

@StefH It works fine for me on a Radzen RadzenDataGrid. It used to throw an exception before upgrading to 1.2.12-preview-01

p.s I've only tested filtering on a text column.

dynamiccore1

@tirth-uhn
Copy link

@StefH it works! Thanks so much for the quick fix.

@wihrl
Copy link

wihrl commented Jul 29, 2021

It works for me too.

@StefH
Copy link
Collaborator

StefH commented Jul 29, 2021

@sofiageo
@wihrl
@tirth-uhn
@enchev

I'll try to release an official 1.2.12 on NuGet this weekend.

Note that I'll also create a new issue to also support the new Queryable methods which are introduced in .NET 6

@StefH StefH added bug and removed feature labels Jul 31, 2021
@StefH
Copy link
Collaborator

StefH commented Jul 31, 2021

#537

@StefH StefH closed this as completed Jul 31, 2021
@Mike-E-angelo
Copy link

Woohoo bless you all. +1 to being brought here due to Radzen. Installed the latest preview and ERRORS BE GONE. Well, until the next one. 😅

Appreciate all the work you are doing out there!

@StefH
Copy link
Collaborator

StefH commented Aug 19, 2021

@Mike-E-angelo
You can also install the official 1.2.12 version.

@Mike-E-angelo
Copy link

Gosh @StefH you're right I got so excited once I saw the preview I stopped reading the rest of the thread and just upvoted. 😆 Updated and installed. 👍

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

No branches or pull requests

6 participants