jasontaylordev / NorthwindTraders

Northwind Traders is a sample application built using ASP.NET Core and Entity Framework Core.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Db Transactions

gkenaston opened this issue · comments

First - Thank you for providing such an excellent reference!

Q: How would you make use of database transactions in a mediator handler?

I considered two options for DB transactions, either implement a filter in the Asp.Net pipeline so everything within a request is in the same transaction, or implement the MediatR IPipelineBehavior and handle the transaction there (as per this response in this repository.
Which is best for you depends on your solution requirements.

Thank you for your interest in this project. This repository has been archived and is no longer actively maintained or supported. We appreciate your understanding. Feel free to explore the codebase and adapt it to your own needs if it serves as a useful reference. If you have any further questions or concerns, please refer to the README for more information.