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);
if (parameters != null && parameters.Any())
builder.SqlQueryBuilder.Parameters.AddRange(parameters);
List<T> result = null;
using (var dataReader = this.GetDataReader(builder.SqlQueryBuilder.ToSqlString(), builder.SqlQueryBuilder.Parameters.ToArray()))
{
result = this.DbBind.DataReaderToList<T>(typeof(T), dataReader, builder.SqlQueryBuilder.Fields);
builder.SqlQueryBuilder.Clear();
}
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();
if (this.Context.Ado.DataReaderParameters != null)
{
foreach (IDataParameter item in this.Context.Ado.DataReaderParameters)

Loading…
Cancel
Save