To expand on that - consider that commit-on-dispose means that you must now be careful to add back try-catch statements to explicitly rollback, instead of using using.
/Oskar 2014-10-05 3:02 GMT+02:00 Gunnar Liljas <[email protected]>: > The transaction is automatically rolled back on dispose, unless previously > committed. It you want to reverse that in your own UoW (which I recommend > against), it of course easy to do so. > > 2014-10-05 0:35 GMT+02:00 Michael Powell <[email protected]>: > >> Hello, >> >> I am working on a Unit Of Work pattern wrapping ISession and >> ITransaction. As a rule of thumb, I am considering UoW to be IDisposable. >> >> I'd like to know, I see that the Session implementation closes the >> session on its dispose, for instance. However, I'm not sure I see the same >> thing for ITransaction at all? At least with AdoTransaction, I believe is >> the default, correct? I do not see that any commits are going on, plus some >> assumptions are going on re: ADO rollbacks. >> >> At minimum, I'd like to expose an interface that allows the UoW user to >> rollback, and if possible automatically commit in the UoW dispose method. >> If necessary provide a Commit interface, but I do not think that's >> necessary assuming the UoW abstraction works well. >> >> UoW would also provide a Repository pattern, further hiding the ISession, >> or other testable, concern, from the user. >> >> Best regards, >> >> Michael >> >> -- >> You received this message because you are subscribed to the Google Groups >> "nhusers" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To post to this group, send email to [email protected]. >> Visit this group at http://groups.google.com/group/nhusers. >> For more options, visit https://groups.google.com/d/optout. >> > > -- > You received this message because you are subscribed to the Google Groups > "nhusers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/nhusers. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "nhusers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/nhusers. For more options, visit https://groups.google.com/d/optout.
