I catch the GenericADOException with InnerException.Message = "Unique key violation ...", for telling the user that the login entered is already in use.
after that I'm trying to get some date (Session.CreateCriteria) i get this error:
null id in "MyEntityType" entry (don't flush the Session after an exception occurs)
http://www.nhforge.org/doc/nh/en/index.html#manipulatingdata-exceptions
If the ISession throws an exception you should immediately rollback the transaction, call ISession.Close() and discard the ISession instance. Certain methods of ISession will not leave the session in a consistent state.
Did you throw away the session after the exception and start a fresh session?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With