Optimistic Locking vs Pessimistic Locking With EF Core
Автор: Milan Jovanović
Загружено: 2023-08-04
Просмотров: 22866
Описание:
☄️ 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: / milanjovanovic
There are two common approaches to concurrency control
Pessimistic locking
Optimistic locking
Pessimistic locking is acquiring a lock on a set of rows while you perform an update. Very safe. Less performant.
Optimistic locking compares the row version we know to the one in the database. If they match, you're allowed to perform the update. If they don't match, you can get an exception.
I'll show you how to implement optimistic locking with EF Core in this video.
Join my weekly .NET newsletter:
https://www.milanjovanovic.tech
Read my Blog here:
https://www.milanjovanovic.tech/blog
Subscribe for more:
/ @milanjovanovictech
Chapters:
0:00 What we are trying to implement
0:47 Pessimistic locking example with transactions
1:59 How Optimistic locking works in theory
2:25 Configuring row version & adding migration
3:48 Optimistic locking in practice with an example
5:48 Which approach should you use?
Повторяем попытку...

Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: