Faithlife / FaithlifeData

Helpers for querying ADO.NET-compatible databases.
https://faithlife.github.io/FaithlifeData/
MIT License
6 stars 4 forks source link

Support automatic transaction commit #46

Open ejball opened 3 years ago

ejball commented 3 years ago

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.