protected override void Dispose(bool disposing) { if (OuterDataContext != this && Session != null && SafeIsDirty(Session)) { Session.Flush(); } base.Dispose(disposing); }