Torna al Thread

public bool Salva() { TransactionOptions transactionOptions = new TransactionOptions(); transactionOptions.IsolationLevel = System.Transactions.IsolationLevel.ReadCommitted; transactionOptions.Timeout = new TimeSpan(0, 5, 0); using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Required, transactionOptions)) { try { bool result = true; if (Codice_Cliente != string.Empty) { } else { result = DataBanker.SalvaCliente(oggetto); } if (result) scope.Complete(); return result; }//Try catch (Exception ex) { return false; } }//TransactionScope }
Copyright © dotNetHell.it 2002-2025
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5