Skip to content

Dynamic is not playing nice with EF+ #418

@hdusten

Description

@hdusten

Good day,

I happened upon an obscure error today. I currently cannot use Dynamic and EF+ side by side using EF Core 3.1.

EDIT: Currently utilizing the latest versions of both libraries from nuget.

I get the following error:

"Oops! Select projection are not supported in EF+ Query IncludeFilter For more information, contact us: info@zzzprojects.com"

The interesting element here is that I'm not explicitly using the IncludeFilter method from EF+

Here is a short version of what will cause the issue to occur inside my repository:

//expression where filter is Expression<Func<T, bool>> utilizing base EF Core framework ("ex. (x => x,Id == Id))
query = query.Where(filter);

//string expression where include is runtime value utilizes EF+ (ex. "Project.Image")
query = query.IncludeOptimizedByPath(include);

//string expression where orderby is runtime value utilizes Linq.Dynamic (ex. "Created desc")
query = query.OrderBy(orderby);

These calls happen in linear succession.

Is there anything I can try to get around this and or is there a fix that can be built for this. I wanted to reach out before attempting to circumvent or workaround this issue.

Thank you.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions