diff --git a/SqlSugar/SqlSugarClient.cs b/SqlSugar/SqlSugarClient.cs index d5a23f6e0..91163fd75 100644 --- a/SqlSugar/SqlSugarClient.cs +++ b/SqlSugar/SqlSugarClient.cs @@ -306,11 +306,11 @@ namespace SqlSugar #region SqlQuery public virtual List SqlQuery(string sql, object whereObj = null) { - var dbPars = this.Database.GetParameters(whereObj); + var parameters = this.Database.GetParameters(whereObj); var builder = InstanceFactory.GetSqlbuilder(base.CurrentConnectionConfig); builder.SqlQueryBuilder.sql.Append(sql); - if (dbPars != null && dbPars.Any()) - builder.SqlQueryBuilder.Parameters.AddRange(dbPars); + if (parameters != null && parameters.Any()) + builder.SqlQueryBuilder.Parameters.AddRange(parameters); using (var dataReader = this.Database.GetDataReader(builder.SqlQueryBuilder.ToSqlString(), builder.SqlQueryBuilder.Parameters.ToArray())) { var reval = this.Database.DbBind.DataReaderToList(typeof(T), dataReader, builder.SqlQueryBuilder.Fields);