lockForUpdate method
Locks the rows read against other readers that also intend to write:
WITH (UPDLOCK, ROWLOCK).
The read-then-write pattern — read a row, decide, update it — is where two callers otherwise both read the old value. Also only meaningful inside a transaction.
Implementation
MssqlQuery lockForUpdate() => _withSourceHint('UPDLOCK, ROWLOCK');