Skip to content

DbContextOptionsBuilder.AddInterceptorsFromAssembly extension method #153

Description

@N1K0232

Nowadays with EntityFrameworkCore 7 we have IInterceptor interface for diagnostics tools.
Actually the DbContextOptionsBuilder object only have two overloads of the method AddInterceptors
The first one takes an IEnumerable and the second takes a param array "params IInterceptor[] interceptors"

I'm using interceptors in a private project. To avoid using too much code I've created this shortcut with this code below
https://pastebin.com/DVPWyAgJ

For a public nuget library, the code I wrote can't be the right solution, because the of the LINQ predicate I'm using to get the list of interceptors. My idea is to simplify the code in the same way we do for the configurations

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions