https://github.com/jokk-itu/hangfire-transaction
Hangfire sample system
https://github.com/jokk-itu/hangfire-transaction
csharp dotnet hangfire sqlserver
Last synced: 2 months ago
JSON representation
Hangfire sample system
- Host: GitHub
- URL: https://github.com/jokk-itu/hangfire-transaction
- Owner: jokk-itu
- License: apache-2.0
- Created: 2025-02-10T19:43:48.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-02-10T20:02:16.000Z (9 months ago)
- Last Synced: 2025-04-05T14:12:10.483Z (7 months ago)
- Topics: csharp, dotnet, hangfire, sqlserver
- Language: C#
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Hangfire Transaction
This repository implements seamless transaction handling between hangfire and a dbcontext from EntityFrameworkCore.
It makes sure the transaction is not upgraded to a distributed transaction by using TransactionScope and one scoped DbConnection being used by DbContext and BackgroundJobClient.
The system consists of one Api, which can be used to successfully commit a transaction, and one endpoint which fails and performs a rollback.
The system consists of one Worker, which acts as a Hangfire server.
The system consists of one job, which is a fire-and-forget job called "DummyJob".
You can invoke the endpoints through the api.http script.