You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This fails because IQueryableExtensions.CallGenericSelectMethod (and a few other places) assumes the entity has a parameterless constructor, causing an exception to be thrown at the statement:
Expression.New(sourceType)
Environment
latest master branch
The text was updated successfully, but these errors were encountered:
That's an interesting feature of EF Core feature that I hadn't seen yet. I think it would be important to investigate if assuming parameterless constructors will or will not lead to JADNC being more tightly coupled with EF Core, because I feel such "EF Core parameter injection" is very EF-specific. But at the same time, having constructors with parameters in general to set read-only properties for models is not necessarily EF-Core specific, so it might/should be OK.
Either way I don't expect I will be able to work on this in the near future as I am currently low on development resources for JADNC (which is why I've been late in replying to your latest issues, my apologies for that)
Description
Getting a resource by ID with sparse fieldsets fails when that resource has a constructor to inject the DbContext, as described here: https://docs.microsoft.com/en-us/ef/core/modeling/constructors.
Example:
This fails because
IQueryableExtensions.CallGenericSelectMethod
(and a few other places) assumes the entity has a parameterless constructor, causing an exception to be thrown at the statement:Environment
latest master branch
The text was updated successfully, but these errors were encountered: