Advertisement
Guest User

Untitled

a guest
Aug 18th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 0.59 KB | None | 0 0
  1.         Using scope As New TransactionScope()
  2.             Dim p As New Payment()
  3.             'Poulate the payment information
  4.             Dim ps = ObjectFactory.GetObject(Of IPaymentService)()
  5.             ps.ProcessPayment(p)
  6.  
  7.             Dim r As New Receipt()
  8.             'Populate the receipt
  9.             Dim rs = ObjectFactory.GetObject(Of IReceiptService)()
  10.             rs.Save(r)
  11.  
  12.             Dim o As New Order()
  13.             'Populate the order
  14.             Dim os = ObjectFactory.GetObject(Of IOrderService)()
  15.             os.Save(o)
  16.  
  17.             scope.Complete()
  18.         End Using
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement