Browse Source

-

pull/12/MERGE
sunkaixuan 7 years ago
parent
commit
49a65157f2
  1. 2
      Src/Asp.Net/SqlSugar/Abstract/AdoProvider/AdoProvider.cs
  2. 2
      Src/Asp.Net/SqlSugar/Abstract/DbBindProvider/DbBindAccessory.cs
  3. 4
      Src/Asp.Net/SqlSugar/Abstract/DbBindProvider/DbBindProvider.cs
  4. 2
      Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs
  5. 2
      Src/Asp.Net/SqlSugar/Interface/IDbBind.cs

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

@ -472,7 +472,7 @@ namespace SqlSugar
if (parameters != null && parameters.Any()) if (parameters != null && parameters.Any())
builder.SqlQueryBuilder.Parameters.AddRange(parameters); builder.SqlQueryBuilder.Parameters.AddRange(parameters);
var dataReader = this.GetDataReader(builder.SqlQueryBuilder.ToSqlString(), builder.SqlQueryBuilder.Parameters.ToArray()); var dataReader = this.GetDataReader(builder.SqlQueryBuilder.ToSqlString(), builder.SqlQueryBuilder.Parameters.ToArray());
List<T> result = this.DbBind.DataReaderToList<T>(typeof(T), dataReader, builder.SqlQueryBuilder.Fields); List<T> result = this.DbBind.DataReaderToList<T>(typeof(T), dataReader);
builder.SqlQueryBuilder.Clear(); builder.SqlQueryBuilder.Clear();
if (this.Context.Ado.DataReaderParameters != null) if (this.Context.Ado.DataReaderParameters != null)
{ {

2
Src/Asp.Net/SqlSugar/Abstract/DbBindProvider/DbBindAccessory.cs

@ -7,7 +7,7 @@ namespace SqlSugar
{ {
public partial class DbBindAccessory public partial class DbBindAccessory
{ {
protected List<T> GetEntityList<T>(SqlSugarClient context, IDataReader dataReader, string fields) protected List<T> GetEntityList<T>(SqlSugarClient context, IDataReader dataReader)
{ {
Type type = typeof(T); Type type = typeof(T);
var fieldNames = GetDataReaderNames(dataReader); var fieldNames = GetDataReaderNames(dataReader);

4
Src/Asp.Net/SqlSugar/Abstract/DbBindProvider/DbBindProvider.cs

@ -175,7 +175,7 @@ namespace SqlSugar
return propertyTypes.First().Value.ToString(); return propertyTypes.First().Value.ToString();
} }
} }
public virtual List<T> DataReaderToList<T>(Type type, IDataReader dataReader, string fields) public virtual List<T> DataReaderToList<T>(Type type, IDataReader dataReader)
{ {
using (dataReader) using (dataReader)
{ {
@ -193,7 +193,7 @@ namespace SqlSugar
} }
else else
{ {
return GetEntityList<T>(Context, dataReader, fields); return GetEntityList<T>(Context, dataReader);
} }
} }
} }

2
Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs

@ -1085,7 +1085,7 @@ namespace SqlSugar
} }
else else
{ {
result = this.Bind.DataReaderToList<TResult>(entityType, dataReader, QueryBuilder.SelectCacheKey); result = this.Bind.DataReaderToList<TResult>(entityType, dataReader);
} }
SetContextModel(result, entityType); SetContextModel(result, entityType);
return result; return result;

2
Src/Asp.Net/SqlSugar/Interface/IDbBind.cs

@ -20,6 +20,6 @@ namespace SqlSugar
string GetDbTypeName(string csharpTypeName); string GetDbTypeName(string csharpTypeName);
string GetCsharpTypeName(string dbTypeName); string GetCsharpTypeName(string dbTypeName);
List<KeyValuePair<string, CSharpDataType>> MappingTypes { get; } List<KeyValuePair<string, CSharpDataType>> MappingTypes { get; }
List<T> DataReaderToList<T>(Type type, IDataReader reader, string fields); List<T> DataReaderToList<T>(Type type, IDataReader reader);
} }
} }

Loading…
Cancel
Save