diff --git a/Src/Asp.Net/SqlSugar/Abstract/AdoProvider/AdoProvider.cs b/Src/Asp.Net/SqlSugar/Abstract/AdoProvider/AdoProvider.cs index 5343b2f55..9d2e98376 100644 --- a/Src/Asp.Net/SqlSugar/Abstract/AdoProvider/AdoProvider.cs +++ b/Src/Asp.Net/SqlSugar/Abstract/AdoProvider/AdoProvider.cs @@ -248,32 +248,6 @@ namespace SqlSugar return Task.FromResult(UseTran(action, errorCallBack)); } - public void UseStoredProcedure(Action action) - { - var oldCommandType = this.CommandType; - this.CommandType = CommandType.StoredProcedure; - this.IsClearParameters = false; - if (action != null) - { - action(); - } - this.CommandType = oldCommandType; - this.IsClearParameters = true; - } - public T UseStoredProcedure(Func action) - { - T result = default(T); - var oldCommandType = this.CommandType; - this.CommandType = CommandType.StoredProcedure; - this.IsClearParameters = false; - if (action != null) - { - result = action(); - } - this.CommandType = oldCommandType; - this.IsClearParameters = true; - return result; - } public IAdo UseStoredProcedure() { this.OldCommandType = this.CommandType; @@ -1731,6 +1705,34 @@ namespace SqlSugar var dt = this.GetDataTable(sql, parameters); return dt == null ? null : this.Context.Utilities.DataTableToDynamic(dt); } + [Obsolete] + public void UseStoredProcedure(Action action) + { + var oldCommandType = this.CommandType; + this.CommandType = CommandType.StoredProcedure; + this.IsClearParameters = false; + if (action != null) + { + action(); + } + this.CommandType = oldCommandType; + this.IsClearParameters = true; + } + [Obsolete] + public T UseStoredProcedure(Func action) + { + T result = default(T); + var oldCommandType = this.CommandType; + this.CommandType = CommandType.StoredProcedure; + this.IsClearParameters = false; + if (action != null) + { + result = action(); + } + this.CommandType = oldCommandType; + this.IsClearParameters = true; + return result; + } #endregion } }