private void CheckWriteTransaction() { if (!this.inTransaction || this.readOnly) throw new InvalidOperationException(); }