Dapper.Transaction 2.0.35

IDbTransaction extension methods for Dapper: A high performance Micro-ORM supporting SQL Server, MySQL, Sqlite, SqlCE, Firebird etc..

Install-Package Dapper.Transaction -Version 2.0.35
dotnet add package Dapper.Transaction --version 2.0.35
<PackageReference Include="Dapper.Transaction" Version="2.0.35" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Dapper.Transaction --version 2.0.35
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Dapper.Transaction

Dapper.Transaction

https://www.nuget.org/packages/Dapper.Transaction/

What's Dapper Transaction?

Dapper Transaction is exactly like Dapper but extend the IDbTransaction interface instead and use Dapper under the hood.

It's a simple library to make it easier to work with a transaction.

Everything Dapper support, Dapper Transaction support it as well (It's only new extension method calling Dapper)

using (var connection = new SqlConnection(FiddleHelper.GetConnectionStringSqlServerW3Schools()))
{
	connection.Open();
	
	using (var transaction = connection.BeginTransaction())
	{
		// Dapper
		var affectedRows1 = connection.Execute(sql, new {CustomerName = "Mark"}, transaction: transaction);
		
		// Dapper Transaction
		var affectedRows2 = transaction.Execute(sql, new {CustomerName = "Mark"});

		transaction.Commit();
	}
}

Method Supported

  • Execute
  • ExecuteAsync
  • ExecuteReader
  • ExecuteReaderAsync
  • ExecuteScalar
  • ExecuteScalarAsync
  • Query
  • QueryAsync
  • QueryFirst
  • QueryFirstAsync
  • QueryFirstOrDefault
  • QueryFirstOrDefaultAsync
  • QuerySingle
  • QuerySingleAsync
  • QuerySingleOrDefault
  • QuerySingleOrDefaultAsync
  • QueryMultiple
  • QueryMultipleAsync

Dapper.Transaction

Dapper.Transaction

https://www.nuget.org/packages/Dapper.Transaction/

What's Dapper Transaction?

Dapper Transaction is exactly like Dapper but extend the IDbTransaction interface instead and use Dapper under the hood.

It's a simple library to make it easier to work with a transaction.

Everything Dapper support, Dapper Transaction support it as well (It's only new extension method calling Dapper)

using (var connection = new SqlConnection(FiddleHelper.GetConnectionStringSqlServerW3Schools()))
{
	connection.Open();
	
	using (var transaction = connection.BeginTransaction())
	{
		// Dapper
		var affectedRows1 = connection.Execute(sql, new {CustomerName = "Mark"}, transaction: transaction);
		
		// Dapper Transaction
		var affectedRows2 = transaction.Execute(sql, new {CustomerName = "Mark"});

		transaction.Commit();
	}
}

Method Supported

  • Execute
  • ExecuteAsync
  • ExecuteReader
  • ExecuteReaderAsync
  • ExecuteScalar
  • ExecuteScalarAsync
  • Query
  • QueryAsync
  • QueryFirst
  • QueryFirstAsync
  • QueryFirstOrDefault
  • QueryFirstOrDefaultAsync
  • QuerySingle
  • QuerySingleAsync
  • QuerySingleOrDefault
  • QuerySingleOrDefaultAsync
  • QueryMultiple
  • QueryMultipleAsync

  • .NETFramework 4.6.1

  • .NETStandard 2.0

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
2.0.35 3,799 4/27/2020