An ExecuteTransaction(Async) method could accept a delegate, begin a transaction, run the delegate, and commit the transaction. If the delegate returns a value, it could return that value.
Can we not commit the transaction if Commit or Fallback was called within the delegate?
This would be especially useful for a DbConnector that automatically retried deadlocks.
An
ExecuteTransaction(Async)
method could accept a delegate, begin a transaction, run the delegate, and commit the transaction. If the delegate returns a value, it could return that value.Can we not commit the transaction if
Commit
orFallback
was called within the delegate?This would be especially useful for a
DbConnector
that automatically retried deadlocks.