internal ITransactionScope WriteScope() { var result = Current; if (result is BulkReadScope) { throw new InvalidOperationException("Nested write transaction inside read only one"); } if (result == null) { result = new BulkWriteScope(); } result.AddRef(); return(Current = result); }
internal ITransactionScope WriteScope() { #if NLOG if (Log.IsTraceEnabled) { Log.Trace("Begin write transaction"); } #endif var result = Current; if (result is BulkReadScope) { throw new InvalidOperationException("Nested write transaction inside read only one"); } if (result == null) { result = new BulkWriteScope(); } result.AddRef(); return(Current = result); }