Method TryGenerateKeysInAmbientTransactionAsync(int)
Provider hook for a refill that must not use a SEPARATE connection, bypassing the shared cache:
SQLite single-writer trap: when the calling scope already holds a write transaction
(BEGIN IMMEDIATE), a refill on another connection waits for the file's only write lock while
the lock holder waits for the refill. Keys come from the scope's transaction instead; a
rollback takes the sequence bump back, while the application may still hold the ids, so the
provider takes every later range above .MSSQL and PostgreSQL inside a TransactionScope: another connection would be a second
connection in the transaction (a distributed transaction). Keys come through the scope's
wrapper on the transaction's connection; sequences are not transactional, so a rollback leaves
a gap, never a duplicate (plan docs/V4/AMBIENT_TRANSACTION_PLAN.md).
Default: null - the refill uses its own connection.
protected virtual Task<List<long>?> TryGenerateKeysInAmbientTransactionAsync(int count)