sqlTransaction 1.0.0
dotnet add package sqlTransaction --version 1.0.0
NuGet\Install-Package sqlTransaction -Version 1.0.0
<PackageReference Include="sqlTransaction" Version="1.0.0" />
<PackageVersion Include="sqlTransaction" Version="1.0.0" />
<PackageReference Include="sqlTransaction" />
paket add sqlTransaction --version 1.0.0
#r "nuget: sqlTransaction, 1.0.0"
#addin nuget:?package=sqlTransaction&version=1.0.0
#tool nuget:?package=sqlTransaction&version=1.0.0
USE test GO
SET NOCOUNT ON
--CREATE TABLE #table --( -- Id INT IDENTITY, -- VALUE varchar(50) PRIMARY KEY --)
--TRUNCATE TABLE #table
BEGIN TRAN SELECT COUNT(*) AS beforeInsert FROM #table
INSERT INTO #table (value) SELECT 'andy8' UNION SELECT 'andy9' UNION SELECT 'andy10' UNION SELECT 'andy11' UNION SELECT 'andy12'
IF @@ROWCOUNT = 0 BEGIN ROLLBACK TRAN RAISERROR('Rowcount = 0, rolling back',16,1) SELECT COUNT(*) AS afterInsertAndRollback FROM #table END ELSE BEGIN
COMMIT TRAN
--RAISERROR ('ROLLBACK occured',16,1)
SELECT COUNT(*) AS afterInsertAndCOMMIT FROM #table
END
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
1.0.0 | 703 | 11/12/2019 |