This project is read-only.

NakedObjects.DomainException (Microsoft.CSharp.RuntimeBinder.RuntimeBinderException)

Nov 17, 2012 at 6:35 AM
Edited Nov 17, 2012 at 7:18 AM

Is there any way to Roll Back the transaction if any Domain Exception happened in NO4? 

Should I use -

NakedObjectsContext.ObjectPersistor.StartTransaction();
NakedObjectsContext.ObjectPersistor.EndTransaction();
NakedObjectsContext.ObjectPersistor.AbortTransaction();
Nov 17, 2012 at 8:11 AM

You should just be able to call:

NakedObjectsContext.ObjectPersistor.AbortTransaction();

In NOF5, we added a method to the Container, so that you could do the same thing but without having to add the Naked Objects Framework assemblies into your model project.  I hope you will be able to move onto NOF 5 soon!

Meantime, if you are intervening in transactions as above, I recommend that you thoroughly test what is happening at the level of database queries to make sure the behaviour is what you are expecting.

Nov 17, 2012 at 8:32 AM

Thank you very much.