Repeatable read is required, serializable is not necessary. Repeatable read ensures that the update will see the same seat count as the previous select did.
Your TransactionScope
needs to span the entire logical unit of work, though. Not just the write.
In raw SQL it would be more elegant to use WITH (UPDLOCK, HOLDLOCK)
but that is not available with EF.
In case of a conflict, a deadlock will easily occur. Either retry the entire logical transaction or select with UPDLOCK
. UPDLOCK
will avoid that deadlock entirely.