-
I've just upgrade NHibernate it is telling me session.Transaction is now obselete and to use GetCurrentTransaction instead. However I noticed in the ThreadLocalSessionContext.cs file that it says:
Is the IsActive check needed? Couldn't it just check that transaction is not null since I thought GetCurrentTransaction would return null if it's not active. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Yeah it's not needed. You can skip this check in your code. I don't remember why it's been left but for some legacy obscure custom transaction handling cases |
Beta Was this translation helpful? Give feedback.
-
Probably we don't need it either. |
Beta Was this translation helpful? Give feedback.
-
Thanks both of you. |
Beta Was this translation helpful? Give feedback.
Yeah it's not needed. You can skip this check in your code. I don't remember why it's been left but for some legacy obscure custom transaction handling cases