- Notifications
You must be signed in to change notification settings - Fork311
Merge | SqlTransaction#3231
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
* Tweak usings* Fix doc hrefs
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlTransaction.csShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
paulmedynski left a comment• edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Some comments/questions about preprocessor directives that are likely relevant to this PR. Other comments about existing code/patterns that we could maybe improve upon since we're here already.
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlTransaction.csShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlTransaction.cs OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlTransaction.csShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlTransaction.csShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlTransaction.csShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlTransaction.csShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlTransaction.csShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlTransaction.csShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlTransaction.csShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
codecovbot commentedMar 20, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@## main #3231 +/- ##==========================================+ Coverage 72.72% 72.78% +0.06%========================================== Files 303 301 -2 Lines 59712 59614 -98 ==========================================- Hits 43426 43393 -33+ Misses 16286 16221 -65
Flags with carried forward coverage won't be shown.Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
a22bf28
intomainUh oh!
There was an error while loading.Please reload this page.
Description: In the latest installment of "Ben Tries To Combine Two Projects Into One", we are merging the SqlTransaction class. This is actually a pretty easy merge - there are ~4 methods that need to be merged into a single file in the common project.
The big headache with these are that they use the constrained execution region pattern that only applies to netfx - this means each of these methods have an entirely different set of exception handling for special exceptions that can only happen in netfx constrained execution regions. However, the netcore implementation has a diagnostic listener that expects an exception to be set on it if one occurs. This presents a challenge of how to retain these differences while also making it readable. There are two patterns we could adopt:
In my humble opinion, option 2 is somewhat better, and it is the pattern I have adopted in this PR.
The other merge as part of this PR is moving SqlTransaction.Common back into the SqlTransaction file. Thus, no more partial for SqlTransaction. The Common file looks to be an early attempt to merge what could be merged, so since we have reconciled the differences, we can bring them all together again.
Testing: Once again, no functional differences, just code moving around.
@edwardneal Please don't be upset if I sniped your next merge target 😄