Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zzzprojects/dapper.transaction
IDbTransaction extension methods for Dapper: A high performance Micro-ORM supporting SQL Server, MySQL, Sqlite, SqlCE, Firebird etc..
https://github.com/zzzprojects/dapper.transaction
dapper transaction
Last synced: about 2 months ago
JSON representation
IDbTransaction extension methods for Dapper: A high performance Micro-ORM supporting SQL Server, MySQL, Sqlite, SqlCE, Firebird etc..
- Host: GitHub
- URL: https://github.com/zzzprojects/dapper.transaction
- Owner: zzzprojects
- License: mit
- Created: 2020-04-01T15:13:55.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-03-20T20:48:56.000Z (10 months ago)
- Last Synced: 2024-05-01T11:50:10.913Z (8 months ago)
- Topics: dapper, transaction
- Language: C#
- Homepage: https://dappertutorial.net/dapper-transaction
- Size: 69.3 KB
- Stars: 28
- Watchers: 3
- Forks: 10
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
## Library Powered By
This library is powered by [Dapper Plus](https://dapper-plus.net/)
---
## 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.
```csharp
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## Useful links
- [Website](https://dappertutorial.net/transaction)
- [Nugget Dapper Transaction](https://www.nuget.org/packages/Dapper.Transaction/)
- [Nugget Dapper Transaction StrongName](https://www.nuget.org/packages/Dapper.Transaction.StrongName/)## Contribute
The best way to contribute is by **spreading the word** about the library:
- Blog it
- Comment it
- Star it
- Share it
A **HUGE THANKS** for your help.## More Projects
- Projects:
- [EntityFramework Extensions](https://entityframework-extensions.net/)
- [Dapper Plus](https://dapper-plus.net/)
- [C# Eval Expression](https://eval-expression.net/)
- Learn Websites
- [Learn EF Core](https://www.learnentityframeworkcore.com/)
- [Learn Dapper](https://www.learndapper.com/)
- Online Tools:
- [.NET Fiddle](https://dotnetfiddle.net/)
- [SQL Fiddle](https://sqlfiddle.com/)
- [ZZZ Code AI](https://zzzcode.ai/)
- and much more!To view all our free and paid projects, visit our website [ZZZ Projects](https://zzzprojects.com/).