static void Main(string[] args) { var client = new PizzaClient(); System.Console.WriteLine(client.Prepare().Message); System.Console.ReadLine(); }
static void Main(string[] args) { var client = new PizzaClient(); var tc = Transaction.Current; using (var t = new TransactionScope(tc)) { try { client.Prepare(); //client.Bake(); //client.Deliver(); t.Complete(); } catch (Exception) { t.Dispose(); } } System.Console.WriteLine(client.Prepare().Message); System.Console.ReadLine(); }