Skip to content

Add IDbCommandInterceptor or similar to allow injecting custom query execution service #15066

@kosinsky

Description

@kosinsky

Sometime application needs more control on executing build SQL statement in the database to add custom retry logic, circuit breakers, CPU usage logging and throttling, injecting session-wide information to support Row-Level-Security etc. That requires injecting custom code that will get SQL Command from the EF Core (or just text + list of parameters), executing it and returning IDataReader back to the EF Core.

EF6 supported that approach by deriving from DbCommandInterceptor and overriding ReaderExecuting and ScalarExecuting.

This issue is a detailed case for #626

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions