BoC.Persistence.NHibernate.DataContext.NHibernateDataContext.SafeIsDirty C# (CSharp) Method

SafeIsDirty() private static method

private static SafeIsDirty ( ISession sess ) : bool
sess ISession
return bool
        private static bool SafeIsDirty(ISession sess)
        {
            var isDirty = false;
            try
            {
                isDirty = sess.IsDirty();
            }
            catch (AssertionFailure)
            {
                isDirty = false; //cannot flush, since something is wrong with the objects (an exception occured already during this DataContext)
            }
            return isDirty;
        }