Merged
Conversation
* Tweak usings * Fix doc hrefs
edwardneal
reviewed
Mar 19, 2025
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlTransaction.cs
Show resolved
Hide resolved
mdaigle
approved these changes
Mar 19, 2025
samsharma2700
approved these changes
Mar 20, 2025
cheenamalhotra
approved these changes
Mar 20, 2025
paulmedynski
requested changes
Mar 20, 2025
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlTransaction.cs
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlTransaction.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlTransaction.cs
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlTransaction.cs
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlTransaction.cs
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlTransaction.cs
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlTransaction.cs
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlTransaction.cs
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlTransaction.cs
Show resolved
Hide resolved
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:
|
paulmedynski
approved these changes
Mar 24, 2025
This was referenced Jan 19, 2026
This was referenced Jan 26, 2026
This was referenced Feb 2, 2026
This was referenced Feb 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 😄