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

DbContextOptionsBuilder.AddInterceptorsFromAssembly extension method #153

Open
N1K0232 opened this issue May 9, 2023 · 0 comments
Open

Comments

@N1K0232
Copy link

N1K0232 commented May 9, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant