File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,8 +18,6 @@ namespace Xtensive.Orm
1818{
1919 public partial class Session
2020 {
21- private static readonly IDisposable EmptyDisposable = new Disposable ( b => { return ; } ) ;
22-
2321 private bool disableAutoSaveChanges ;
2422 private KeyRemapper remapper ;
2523 private bool persistingIsFailed ;
@@ -246,7 +244,7 @@ public IDisposable DisableSaveChanges(IEntity target)
246244 targetEntity . EnsureNotRemoved ( ) ;
247245 return Configuration . Supports ( SessionOptions . AutoSaveChanges )
248246 ? pinner . RegisterRoot ( targetEntity . State )
249- : EmptyDisposable ; // No need to pin in this case
247+ : null ; // No need to pin in this case
250248 }
251249
252250 /// <summary>
@@ -260,7 +258,7 @@ public IDisposable DisableSaveChanges(IEntity target)
260258 public IDisposable DisableSaveChanges ( )
261259 {
262260 if ( ! Configuration . Supports ( SessionOptions . AutoSaveChanges ) ) {
263- return EmptyDisposable ; // No need to pin in this case
261+ return null ; // No need to pin in this case
264262 }
265263 if ( disableAutoSaveChanges )
266264 return null ;
You can’t perform that action at this time.
0 commit comments