|
|
@ -311,8 +311,7 @@ namespace SqlSugar |
|
|
|
sqlCommand.Parameters.Clear(); |
|
|
|
ExecuteAfter(sql, parameters); |
|
|
|
SetConnectionEnd(sql); |
|
|
|
if (this.Context.CurrentConnectionConfig.DbType == DbType.Sqlite) |
|
|
|
sqlCommand.Dispose(); |
|
|
|
//sqlCommand.Dispose();
|
|
|
|
return sqlDataReader; |
|
|
|
} |
|
|
|
catch (Exception ex) |
|
|
@ -446,8 +445,7 @@ namespace SqlSugar |
|
|
|
sqlCommand.Parameters.Clear(); |
|
|
|
ExecuteAfter(sql, parameters); |
|
|
|
SetConnectionEnd(sql); |
|
|
|
if (this.Context.CurrentConnectionConfig.DbType == DbType.Sqlite) |
|
|
|
sqlCommand.Dispose(); |
|
|
|
//sqlCommand.Dispose();
|
|
|
|
return sqlDataReader; |
|
|
|
} |
|
|
|
catch (Exception ex) |
|
|
@ -884,7 +882,7 @@ namespace SqlSugar |
|
|
|
} |
|
|
|
public async Task<Tuple<List<T>, List<T2>, List<T3>, List<T4>, List<T5>, List<T6>>> SqlQueryAsync<T, T2, T3, T4, T5, T6>(string sql, object parameters = null) |
|
|
|
{ |
|
|
|
var result =await SqlQueryAsync<T, T2, T3, T4, T5, T6, object>(sql, parameters); |
|
|
|
var result = await SqlQueryAsync<T, T2, T3, T4, T5, T6, object>(sql, parameters); |
|
|
|
return new Tuple<List<T>, List<T2>, List<T3>, List<T4>, List<T5>, List<T6>>(result.Item1, result.Item2, result.Item3, result.Item4, result.Item5, result.Item6); |
|
|
|
} |
|
|
|
public async Task<Tuple<List<T>, List<T2>, List<T3>, List<T4>, List<T5>, List<T6>, List<T7>>> SqlQueryAsync<T, T2, T3, T4, T5, T6, T7>(string sql, object parameters = null) |
|
|
@ -901,7 +899,7 @@ namespace SqlSugar |
|
|
|
List<T> result = new List<T>(); |
|
|
|
if (DbReader.HasRows) |
|
|
|
{ |
|
|
|
result =await GetDataAsync<T>(typeof(T), dataReader); |
|
|
|
result = await GetDataAsync<T>(typeof(T), dataReader); |
|
|
|
} |
|
|
|
List<T2> result2 = null; |
|
|
|
if (NextResult(dataReader)) |
|
|
@ -1178,7 +1176,7 @@ namespace SqlSugar |
|
|
|
{ |
|
|
|
return dataReader.NextResult(); |
|
|
|
} |
|
|
|
catch |
|
|
|
catch |
|
|
|
{ |
|
|
|
return false; |
|
|
|
} |
|
|
@ -1391,7 +1389,7 @@ namespace SqlSugar |
|
|
|
List<TResult> result; |
|
|
|
if (entityType == UtilConstants.DynamicType) |
|
|
|
{ |
|
|
|
result =await this.Context.Utilities.DataReaderToExpandoObjectListAsyncNoUsing(dataReader) as List<TResult>; |
|
|
|
result = await this.Context.Utilities.DataReaderToExpandoObjectListAsyncNoUsing(dataReader) as List<TResult>; |
|
|
|
} |
|
|
|
else if (entityType == UtilConstants.ObjType) |
|
|
|
{ |
|
|
@ -1400,11 +1398,11 @@ namespace SqlSugar |
|
|
|
} |
|
|
|
else if (entityType.IsAnonymousType()) |
|
|
|
{ |
|
|
|
result =await this.Context.Utilities.DataReaderToListAsyncNoUsing<TResult>(dataReader); |
|
|
|
result = await this.Context.Utilities.DataReaderToListAsyncNoUsing<TResult>(dataReader); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
result =await this.Context.Ado.DbBind.DataReaderToListNoUsingAsync<TResult>(entityType, dataReader); |
|
|
|
result = await this.Context.Ado.DbBind.DataReaderToListNoUsingAsync<TResult>(entityType, dataReader); |
|
|
|
} |
|
|
|
return result; |
|
|
|
} |
|
|
|