adamfoneil / Dapper.CX

A Crud library based on Dapper
MIT License
8 stars 1 forks source link

optimistic locking (concurrency check) #30

Open adamfoneil opened 3 years ago

adamfoneil commented 3 years ago

Historically, I've never needed this, and have always used a "last edit wins" approach to CRUD. But I think it would be neat to be able to opt into an optimistic locking feature that integrated with the Get and Update methods to acquire and release locks on rows. I saw this in an EF Core demo. I'd like this to work at the service level and not have to do anything at the model layer in particular -- for example, no particular interface to implement.

Note, I can see this morphing into an overhaul of the AO.Models project by moving away from model-layer interfaces to a new opt-in service layer. This would simplify the dependency footprint, removing the need to do what I'm doing today with partial classes and linked source.