I am working on analaysis and preventive measure for deadlock in application, Where I found following line of code for transaction scope:
var tranaction = new TransactionOptions { IsolationLevel = IsolationLevel.ReadUncommitted };
// TransactionScopeOption.Required changed to Suppress for 2 tier issue with MSDTC
using (var transactionScope = new TransactionScope(TransactionScopeOption.Suppress, tranaction))
{
//Select entity command.
}
We are only having some select
entity statement which will allow dirty read operations.
I have read some resources on TransactionScopeOption
but here I don't find exact TransactionScopeOption
in this case or feel like we can change option to RequiredNew
and let's create new transaction every time when select command executed. Need help to move forward. We are using SQL Server as datasource. If we change it to RequiredNew
then what will be the performance impact since this change will be done for all select entity command in application?