diff --git a/Src/Asp.Net/SqlSugar/Infrastructure/SqlSugarAccessory.cs b/Src/Asp.Net/SqlSugar/Infrastructure/SqlSugarAccessory.cs index 3db2d1392..482e3c99f 100644 --- a/Src/Asp.Net/SqlSugar/Infrastructure/SqlSugarAccessory.cs +++ b/Src/Asp.Net/SqlSugar/Infrastructure/SqlSugarAccessory.cs @@ -73,6 +73,17 @@ namespace SqlSugar this.Context._Ado = value; } } + protected IContextMethods ContextRewritableMethods + { + get + { + return this.Context._RewritableMethods; + } + set + { + this.Context._RewritableMethods = value; + } + } #endregion #region Init mppingInfo diff --git a/Src/Asp.Net/SqlSugar/SqlSugarClient.cs b/Src/Asp.Net/SqlSugar/SqlSugarClient.cs index 256195320..568d2184c 100644 --- a/Src/Asp.Net/SqlSugar/SqlSugarClient.cs +++ b/Src/Asp.Net/SqlSugar/SqlSugarClient.cs @@ -80,14 +80,14 @@ namespace SqlSugar { get { - if (this.Context._RewritableMethods == null) + if (ContextRewritableMethods == null) { - this.Context._RewritableMethods = new ContextMethods(); - this.Context._RewritableMethods.Context = this.Context; + ContextRewritableMethods = new ContextMethods(); + ContextRewritableMethods.Context = this.Context; } - return this.Context._RewritableMethods; + return ContextRewritableMethods; } - set { this.Context._RewritableMethods = value; } + set { ContextRewritableMethods = value; } } #endregion