Пример #1
0
            /// <summary>
            /// Default ctor used to temporarily stop dirty tracking.
            /// </summary>
            /// <param name="model">The model to pause the tracking on.</param>
            public IgnoreDirtyScope(DirtyBaseEntity model)
            {
                _Disposed = false;

                _Model = model;

                _IsDirty = _Model._IsDirty;
                _Model.StopDirtyTracking();
            }
Пример #2
0
            private void Dispose(bool disposing)
            {
                if (!_Disposed)
                {
                    return;
                }

                if (disposing)
                {
                    _Model.ResetDirtyTracking();
                    _Model._IsDirty = _IsDirty;

                    _Model = null;
                }

                _Disposed = true;
            }
Пример #3
0
            private void Dispose(bool disposing)
            {
                if (!_Disposed) return;

                if (disposing)
                {
                    _Model.ResetDirtyTracking();
                    _Model._IsDirty = _IsDirty;

                    _Model = null;
                }

                _Disposed = true;
            }
Пример #4
0
            /// <summary>
            /// Default ctor used to temporarily stop dirty tracking.
            /// </summary>
            /// <param name="model">The model to pause the tracking on.</param>
            public IgnoreDirtyScope(DirtyBaseEntity model)
            {
                _Disposed = false;

                _Model = model;

                _IsDirty = _Model._IsDirty;
                _Model.StopDirtyTracking();
            }