Skip to content
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

Add OnlyOnInclude option for the root rewritter #91

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zoriya
Copy link
Contributor

@zoriya zoriya commented Oct 28, 2023

This allows projectable properties to be marked as OnlyOnInclude and only opt-in root query rewriting by explicitly calling a .Include(x => x.ProjectedProperty). This was discussed in #84 by @yinzara.

PS: maybe this should be the default mode for root query rewriting?

(PR based on #90)

@koenbeuk
Copy link
Owner

koenbeuk commented Oct 31, 2023

I like this, though I'm somewhat in doubt if this is really desired. By default in EF you'll get all properties when you select an Entity. If you want to select a subset then you'll have to be explicit about this. This turns that logic around, (you won't get it unless you explicitly ask for it). Granted this is already the case when it comes to including relationships...

@zoriya zoriya force-pushed the feat/includes branch 2 times, most recently from 66b19a6 to ec7c478 Compare November 3, 2023 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants