Open zoriya opened 8 months ago
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...
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)