Enable configurable TransactionIsolationLevel
Is your feature request related to a problem? Please describe. I have a requirement to have a configurable default transaction isolation level. A product that has multiple customers running on multiple different environments and some environments want to start using Snapshot isolation level by default, however, some environments don't have the option or customers are unwilling to enable that on their servers. The current approach only allows us to define isolation level on the attribute, but unfortuanatelly that cannot be changed dynamically at runtime based on configuration.
Describe the solution you'd like I would like to have an option to create a custom handler for TransactionalDataPortal.GetTransactionOptions We could have something simple like: public static void SetTransactionOptionsHandler(Func<TransactionOptions> handler){ ... }
Describe alternatives you've considered Another alternative would be to allow us to create and configure our own version of the transactional dataportal so we can fully control behavior. Last but not least, making this custom handler configurable during startup when configuring Csla itself would good too.
I'd be more than happy to create a PR for this if we can agree on an approach.
Cheers
Hi. Currently you can configure the transaction settings at startup for a process with this option class: https://github.com/MarimerLLC/csla/blob/f8ad0074d0b0e88111d74259b1f413fcfc00b341/Source/Csla/Configuration/Fluent/DataOptions.cs#L17
As long as your customers have different processes running you should be able too set specific default for each.
HtH