Closed
Description
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:
public sealed class User : Identifiable
{
public User(AppDbContext context)
{
}
}
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
Metadata
Metadata
Assignees
Labels
No labels