sharedLock method
Holds a shared lock on the rows read until the transaction ends:
WITH (HOLDLOCK, ROWLOCK).
Others can still read them but not change them. Outside a transaction the lock is released immediately, so this belongs inside one.
Implementation
MssqlQuery sharedLock() => _withSourceHint('HOLDLOCK, ROWLOCK');