<PackageReference Include="System.Data.SqlClient" Version="4.8.4" />

SqlTransaction

public sealed class SqlTransaction : DbTransaction
Represents a Transact-SQL transaction to be made in a SQL Server database. This class cannot be inherited.
public SqlConnection Connection { get; }

Gets the SqlConnection object associated with the transaction, or null if the transaction is no longer valid.

public void Rollback(string transactionName)

Rolls back a transaction from a pending state, and specifies the transaction or savepoint name.

public void Save(string savePointName)

Creates a savepoint in the transaction that can be used to roll back a part of the transaction, and specifies the savepoint name.