-
-
Notifications
You must be signed in to change notification settings - Fork 231
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
Select Issue in EFCore 3 Update #385
Comments
Hello @andresgbertola , Thank you for reporting, My developer will try it with the information you provided. Could you confirm that you got this error with Best Regards, Jon Performance Libraries Runtime Evaluation |
Hello @JonathanMagnan! In the above example, I was using an InMemory DbContext. Just in case, I´m using the lastest version of System.Linq.Dynamic.Core package (v1.1.2). Thanks! |
Hello @andresgbertola , We checked to fix it for I did some test with some version released 1-2 years ago, we get the same issue. So we will close this issue as I don't think there is anything we can do on our side. |
After updating from EFCore 2.1 to EFCore 3.0 I started getting an error when using a select clause in System.Dynamic.Linq.
I have for example these three entity classes:
An
Order
has aCustomer
, and aCustomer
has a collection ofDeliveryPoints
.Each class has more properties, but I will just keep it simple for the example.
Then. I have a code generator method to dinamically generate the "select" string to be executed using System.Dynamic.Linq.
As I said, this is working in EF Core 2.1, but not with EF Core 3.0.
Now I´m getting this error when the
SingleOrDefault();
is performed in the last sentence:The problem seems to be in this kind of statement:
new (Customer.Id, Customer.Name, Customer.DeliveryPoints.Select(new (Id, Name, Address)).ToArray() as DeliveryPoints) as Customer)
Where it creates one object with an array inside. In this case, a
Customer
, with aDeliveryPoints
Array.Stacktrace:
The text was updated successfully, but these errors were encountered: