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

Prefer passing IDbTransaction to methods that permit it. #8

Open
amanda-mitchell opened this issue Dec 29, 2018 · 0 comments
Open

Prefer passing IDbTransaction to methods that permit it. #8

amanda-mitchell opened this issue Dec 29, 2018 · 0 comments
Labels
new analyzer Suggestion for a new analyzer to add

Comments

@amanda-mitchell
Copy link
Contributor

A couple of possible variations:

When an IDbTransaction is in scope, find all methods that could be called with the IDbTransaction (but aren't) and flag them as errors. Create a code fix provider that calls the appropriate overload.

When an IDbTransaction is in scope, find all methods that accept an IDbConnection, and flag them as errors if the IDbTransaction is not passed to them. Create one code fix provider that attempts to call an appropriate overload, and another code fix provider that adds a parameter to the target method if there isn't an appropriate overload.

@bgrainger bgrainger added the new analyzer Suggestion for a new analyzer to add label Dec 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new analyzer Suggestion for a new analyzer to add
Development

No branches or pull requests

2 participants