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

Analyzer to warn against accidental usage of AddEntityFrameworkProvider #25455

Open
Tracked by #22086
roji opened this issue Aug 8, 2021 · 2 comments
Open
Tracked by #22086

Analyzer to warn against accidental usage of AddEntityFrameworkProvider #25455

roji opened this issue Aug 8, 2021 · 2 comments

Comments

@roji
Copy link
Member

roji commented Aug 8, 2021

Following #25451, we can warn when AddEntityFrameworkProvider is called from user code instead of AddProvider. Providers would disable this diagnostic.

@ajcvickers
Copy link
Member

ajcvickers commented Aug 9, 2021

It is necessary to call these methods from user code when taking control of the internal service provider. Most people should not be doing that, but there are times when it makes sense.

@roji
Copy link
Member Author

roji commented Aug 9, 2021

@ajcvickers assuming the legitimate cases are rare enough to warrant hiding these methods from Intellisense, it could make sense to also have a diagnostic (which users can suppress). But if you feel this is bad for some reason we can close.

@ajcvickers ajcvickers added this to the Backlog milestone Aug 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants