Working With Database Transactions In EF Core

Working With Database Transactions In EF Core

26.109 Lượt nghe
Working With Database Transactions In EF Core
☄️ Master the Modular Monolith Architecture: https://bit.ly/3SXlzSt 📌 Accelerate your Clean Architecture skills: https://bit.ly/3PupkOJ 🚀 Support me on Patreon to access the source code: https://www.patreon.com/milanjovanovic If you're working with a SQL database, transactions should be an essential component in your toolbox. However, this can easily be obscured if you're working with an ORM. So in this video, I'll show you how to work with transactions in EF Core. Join my weekly .NET newsletter: https://www.milanjovanovic.tech Working With Transaction In EF Core https://www.milanjovanovic.tech/blog/working-with-transactions-in-ef-core SQL Server - Transaction Isolation Levels https://learn.microsoft.com/en-us/sql/t-sql/language-elements/transaction-isolation-levels?view=sql-server-ver16 Read my Blog here: https://www.milanjovanovic.tech/blog Subscribe for more: https://www.youtube.com/@MilanJovanovicTech?sub_confirmation=1 Chapters 0:00 Setting the scene 1:21 Default transaction behavior in EF Core 1:57 What if you have multiple calls to SaveChanges? 3:05 Defining the method for starting a transaction 4:31 Creating a new transaction with EF Core 5:52 Using transactions in your application 7:57 How transactions work in practice 12:53 Using EF Core's CurrentTransaction implicitly