Browse Source

-

pull/12/MERGE
sunkaixuan 7 years ago
parent
commit
24aa55f3d4
  1. 9
      Src/Asp.Net/SqlSugar/Abstract/AdoProvider/AdoProvider.cs

9
Src/Asp.Net/SqlSugar/Abstract/AdoProvider/AdoProvider.cs

@ -439,12 +439,9 @@ namespace SqlSugar
builder.SqlQueryBuilder.sql.Append(sql); builder.SqlQueryBuilder.sql.Append(sql);
if (parameters != null && parameters.Any()) if (parameters != null && parameters.Any())
builder.SqlQueryBuilder.Parameters.AddRange(parameters); builder.SqlQueryBuilder.Parameters.AddRange(parameters);
List<T> result = null; var dataReader = this.GetDataReader(builder.SqlQueryBuilder.ToSqlString(), builder.SqlQueryBuilder.Parameters.ToArray());
using (var dataReader = this.GetDataReader(builder.SqlQueryBuilder.ToSqlString(), builder.SqlQueryBuilder.Parameters.ToArray())) List<T> result = this.DbBind.DataReaderToList<T>(typeof(T), dataReader, builder.SqlQueryBuilder.Fields);
{ builder.SqlQueryBuilder.Clear();
result = this.DbBind.DataReaderToList<T>(typeof(T), dataReader, builder.SqlQueryBuilder.Fields);
builder.SqlQueryBuilder.Clear();
}
if (this.Context.Ado.DataReaderParameters != null) if (this.Context.Ado.DataReaderParameters != null)
{ {
foreach (IDataParameter item in this.Context.Ado.DataReaderParameters) foreach (IDataParameter item in this.Context.Ado.DataReaderParameters)

Loading…
Cancel
Save