public void UseTransactionScopeTest() { AdoWith.TransactionScope(TransactionScopeOption.Required, System.Transactions.IsolationLevel.ReadCommitted, SetParameterValuesGeneric, MethodInTransaction); }
public void TransactionScope_ShouldNotPromoteToDTC3() { TestTool.RunTasks(10, () => AdoWith.TransactionScope(TransactionScopeOption.Required, System.Transactions.IsolationLevel.ReadCommitted, delegate { var count = TotalCount(); }, delegate { NorthwindAdoRepository.ExecuteNonQueryBySqlString(SQL_REGION_INSERT); NorthwindAdoRepository.ExecuteNonQueryBySqlString(SQL_REGION_INSERT2); NorthwindAdoRepository.ExecuteNonQueryBySqlString(SQL_REGION_DELETE); }, delegate { var ds = NorthwindAdoRepository.ExecuteDataSetBySqlString( SQL_REGION_SELECT, 1, 10); }, delegate { var dt = NorthwindAdoRepository.ExecuteDataTableBySqlString( SQL_REGION_SELECT, 1, 10); } )); }