50 votes5 comments · [Closed] Entity Framework Core Feature Suggestions · Flag idea as inappropriate… · Admin →
Resetting status to reflect current state of EF Core. Some of this functionality is available to EF6-based applications: only access to store DbExpression trees and DbCommand are available, and there are no plans for adding a LINQ level interception point.Paul King commented
To expand on this a bit further, this would allow us to do something with an Entity before it is added to the ObjectStateManager, including reject the Entity entirely.
This “QueryStarting” event would allow us to “rewrite” the query by wrapping it in an outer query that adds a filter to the results from the main query.
Doing this at the event level allows this type of filtering to be placed in one place int he code instead of on each query being executed.