koenbeuk / EntityFrameworkCore.Projectables

Project over properties and functions in your linq queries
MIT License
260 stars 17 forks source link

Fix eager includes not working #90

Closed zoriya closed 8 months ago

zoriya commented 8 months ago

Before this changes, doing:

database.Users.Include(x => x.Orders).First()

resulted in a null Orders field. This fixes this issue.

This also fixes a bug where query rewriting would be disabled when it should not.

koenbeuk commented 8 months ago

Looks good, I am in general still somewhat concerned about corner cases that we haven't caught yet and otherwise a negative performance impact for doing query root rewrites. It would be great if we can at least cache and reuse the generated projectable select expression and give the user the ability to opt in/out of this feature altogether.

I'm planning on diving back into the repo and get things cleaned up and ready to go for EF 8, will also look into this then.

Thanks for your contribution!