Continuing the above case I came accross another issue:
When starting using transactions with my save, I have decided to test the RollBack transaction case. My code looks exactly like the one in the documentation, with an addition of the throw statement:
try {
BusinessLayer.TransactionBegin("", IsolationLevel.ReadUncommitted);
mContactBO.Save(true);
throw new ArgumentException();
BusinessLayer.TransactionCommit("");
}
catch(Exception x) {
Debug.WriteLine(x.Message);
BusinessLayer.TransactionRollback("");
}
The transaction rolls back fine, nothing is changed in the DB. When I try to save the changes again, the Save method of the BO gets into an infinite loop where the framework keeps calling my update stored procedure, and then a select statement. This keeps going on and on until it crushes with a StackOverflow exception. The update stored procedure is exactly the same with the one DDT generates.
Any ideas?
I am new to this framework, and I try to do exactly what the documentation says, but I keep getting into all those issues. The documentation does not help a lot and I keep falling behind of schedule.
Can anyone help me with this?
Thank you