File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -18,8 +18,6 @@ namespace Xtensive.Orm
18
18
{
19
19
public partial class Session
20
20
{
21
- private static readonly IDisposable EmptyDisposable = new Disposable ( b => { return ; } ) ;
22
-
23
21
private bool disableAutoSaveChanges ;
24
22
private KeyRemapper remapper ;
25
23
private bool persistingIsFailed ;
@@ -246,7 +244,7 @@ public IDisposable DisableSaveChanges(IEntity target)
246
244
targetEntity . EnsureNotRemoved ( ) ;
247
245
return Configuration . Supports ( SessionOptions . AutoSaveChanges )
248
246
? pinner . RegisterRoot ( targetEntity . State )
249
- : EmptyDisposable ; // No need to pin in this case
247
+ : null ; // No need to pin in this case
250
248
}
251
249
252
250
/// <summary>
@@ -260,7 +258,7 @@ public IDisposable DisableSaveChanges(IEntity target)
260
258
public IDisposable DisableSaveChanges ( )
261
259
{
262
260
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
264
262
}
265
263
if ( disableAutoSaveChanges )
266
264
return null ;
You can’t perform that action at this time.
0 commit comments