When I save the data in a database, I used TransactionScope with the IsolationLevel parameter for Serializable.
TransactionOptions options = new TransactionOptions { IsolationLevel=IsolationLevel.Serializable }; using (var transaction = new TransactionScope(TransactionScopeOption.Required,options)) { transation.Complete(); }
Now, after the completion of the execution, I want to change the TransactionScopeIsolationLevel.
Edit
I understand that if IsolationLevel is set to Serializable, then after the transaction is completed, the connection object is closed and returned to the connection pool, and when some other request arrives, it retrieves this connection object from the pool and thus is executed by the previous IsolationLevel. Therefore, I want to change the default isolation level after each transaction.
source share