I am using LLBLGen Pro 2.5 with self-servicing. If I want to add some rows into my tables within a transaction and then update the first row I added, do I have to add that first entity into the transaction object again?
Here is a fictional example of what I mean:
Dim objCustomer as New CustomerEntity()
Dim trans as new Transaction(IsolationLevel.ReadCommitted, "AddRecord")
objCustomer.FirstName = "John"
objCustomer.LastName = "Locke"
objCustomer.DateCreated = DateTime.Now
trans.Add(objCustomer)
objCustomer.Save()
Dim objOrder as New OrderEntity()
objOrder.CustomerID = objCustomer.CustomerID
objOrder.OrderDate = DateTime.Now
trans.Add(objOrder)
objOrder.Save()
objCustomer.FirstOrderID = objOrder.OrderID
trans.Add(objCustomer) 'DO I DO THIS??????
objCustomer.Save()
trans.Commit()
Any advice would be greatly appreciated!