-
Notifications
You must be signed in to change notification settings - Fork 330
-
SqlTransaction inherits from DbTransaction that has a default implementation for SupportsSavepoint that returns false.
https://github.com/dotnet/runtime/blob/1d1bf92fcf43aa6981804dc53c5174445069c9e4/src/libraries/System.Data.Common/src/System/Data/Common/DbTransaction.cs#L83C29-L83C47
The documentation for SupportsSavepoints states that it should throw NotSupportedException if not implemented.
SqlTransaction does not provide an override for SupportsSavepoints. Looking at the source for SqlInternalTransaction that SqlTransaction uses, there are clues that suggest the savepoints are supported.
SqlClient/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlInternalTransaction.cs
Line 362 in be62e90
Based on this I'm assuming it supports it when using SQL Server and Microsoft has just forgotten to override SupportsSavepoints.
Beta Was this translation helpful? Give feedback.