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

Implement entity materialization interception #28274

Merged
merged 2 commits into from
Jun 20, 2022

Commits on Jun 20, 2022

  1. Implement entity materialization interception

    Part of #626
    Fixes #15911
    
    Introduces a new `IMaterializationInterceptor` singleton interceptor that allows:
    - Interception before any entity instance has been created, allowing a customized instance to be created (if desired), thereby suppressing of normal EF instance creation.
    - Interception after the instance has been created, but before property values have been set. The instance can be replaced with a new instance (if desired), without preventing EF from setting property values.
    - Interception before property values have been set, allowing custom setting of the values and/or suppression of setting the values by EF (if desired).
    - Interception after property values have been set, allowing the instance to be changed (if desired.)
    
    Access to property values, including shadow and service properties is provided at each point.
    
    If no singleton materialization interceptors are configured, then the materialization delegate is the same as before, meaning any perf impact only applies if interception is used.
    ajcvickers committed Jun 20, 2022
    Configuration menu
    Copy the full SHA
    6560b2a View commit details
    Browse the repository at this point in the history
  2. Review updates.

    ajcvickers committed Jun 20, 2022
    Configuration menu
    Copy the full SHA
    0b4ccc9 View commit details
    Browse the repository at this point in the history