Browse Source

-

pull/12/MERGE
sunkaixuan 6 years ago
parent
commit
9487d68557
  1. 209
      Src/Asp.Net/SqlSugar/Abstract/AdoProvider/AdoProvider.cs
  2. 19
      Src/Asp.Net/SqlSugar/Abstract/DbBindProvider/DbBindProvider.cs
  3. 35
      Src/Asp.Net/SqlSugar/Abstract/SugarProvider/SqlSugarProvider.cs
  4. 39
      Src/Asp.Net/SqlSugar/Abstract/UpdateProvider/UpdateableProvider.cs
  5. 6
      Src/Asp.Net/SqlSugar/Interface/IAdo.cs
  6. 3
      Src/Asp.Net/SqlSugar/Interface/IDbBind.cs

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

@ -803,7 +803,6 @@ namespace SqlSugar
return Tuple.Create<List<T>, List<T2>>(result, result2);
}
}
public Tuple<List<T>, List<T2>, List<T3>> SqlQuery<T, T2, T3>(string sql, object parameters = null)
{
var parsmeterArray = this.GetParameters(parameters);
@ -835,7 +834,6 @@ namespace SqlSugar
return Tuple.Create<List<T>, List<T2>, List<T3>>(result, result2, result3);
}
}
public Tuple<List<T>, List<T2>, List<T3>, List<T4>> SqlQuery<T, T2, T3, T4>(string sql, object parameters = null)
{
var parsmeterArray = this.GetParameters(parameters);
@ -904,7 +902,6 @@ namespace SqlSugar
return Tuple.Create<List<T>, List<T2>, List<T3>, List<T4>, List<T5>>(result, result2, result3, result4, result5);
}
}
public Tuple<List<T>, List<T2>, List<T3>, List<T4>, List<T5>, List<T6>> SqlQuery<T, T2, T3, T4, T5, T6>(string sql, object parameters = null)
{
var parsmeterArray = this.GetParameters(parameters);
@ -942,7 +939,6 @@ namespace SqlSugar
return Tuple.Create<List<T>, List<T2>, List<T3>, List<T4>, List<T5>, List<T6>>(result, result2, result3, result4, result5, result6);
}
}
public Tuple<List<T>, List<T2>, List<T3>, List<T4>, List<T5>, List<T6>, List<T7>> SqlQuery<T, T2, T3, T4, T5, T6, T7>(string sql, object parameters = null)
{
var parsmeterArray = this.GetParameters(parameters);
@ -983,6 +979,211 @@ namespace SqlSugar
}
}
public async Task<Tuple<List<T>, List<T2>>> SqlQueryAsync<T, T2>(string sql, object parameters = null)
{
var parsmeterArray = this.GetParameters(parameters);
this.Context.InitMappingInfo<T>();
var builder = InstanceFactory.GetSqlbuilder(this.Context.CurrentConnectionConfig);
builder.SqlQueryBuilder.sql.Append(sql);
if (parsmeterArray != null && parsmeterArray.Any())
builder.SqlQueryBuilder.Parameters.AddRange(parsmeterArray);
using (var dataReader =await this.GetDataReaderNoCloseAsync(builder.SqlQueryBuilder.ToSqlString(), builder.SqlQueryBuilder.Parameters.ToArray()))
{
List<T> result =await this.DbBind.DataReaderToListNoUsingAsync<T>(typeof(T), dataReader);
NextResult(dataReader);
List<T2> result2 =await this.DbBind.DataReaderToListNoUsingAsync<T2>(typeof(T2), dataReader);
builder.SqlQueryBuilder.Clear();
if (this.Context.Ado.DataReaderParameters != null)
{
foreach (IDataParameter item in this.Context.Ado.DataReaderParameters)
{
var parameter = parsmeterArray.FirstOrDefault(it => item.ParameterName.Substring(1) == it.ParameterName.Substring(1));
if (parameter != null)
{
parameter.Value = item.Value;
}
}
this.Context.Ado.DataReaderParameters = null;
}
return Tuple.Create<List<T>, List<T2>>(result, result2);
}
}
public async Task<Tuple<List<T>, List<T2>, List<T3>>> SqlQueryAsync<T, T2, T3>(string sql, object parameters = null)
{
var parsmeterArray = this.GetParameters(parameters);
this.Context.InitMappingInfo<T>();
var builder = InstanceFactory.GetSqlbuilder(this.Context.CurrentConnectionConfig);
builder.SqlQueryBuilder.sql.Append(sql);
if (parsmeterArray != null && parsmeterArray.Any())
builder.SqlQueryBuilder.Parameters.AddRange(parsmeterArray);
using (var dataReader =await this.GetDataReaderNoCloseAsync(builder.SqlQueryBuilder.ToSqlString(), builder.SqlQueryBuilder.Parameters.ToArray()))
{
List<T> result =await this.DbBind.DataReaderToListNoUsingAsync<T>(typeof(T), dataReader);
NextResult(dataReader);
List<T2> result2 =await this.DbBind.DataReaderToListNoUsingAsync<T2>(typeof(T2), dataReader);
NextResult(dataReader);
List<T3> result3 =await this.DbBind.DataReaderToListNoUsingAsync<T3>(typeof(T3), dataReader);
builder.SqlQueryBuilder.Clear();
if (this.Context.Ado.DataReaderParameters != null)
{
foreach (IDataParameter item in this.Context.Ado.DataReaderParameters)
{
var parameter = parsmeterArray.FirstOrDefault(it => item.ParameterName.Substring(1) == it.ParameterName.Substring(1));
if (parameter != null)
{
parameter.Value = item.Value;
}
}
this.Context.Ado.DataReaderParameters = null;
}
return Tuple.Create<List<T>, List<T2>, List<T3>>(result, result2, result3);
}
}
public async Task<Tuple<List<T>, List<T2>, List<T3>, List<T4>>> SqlQueryAsync<T, T2, T3, T4>(string sql, object parameters = null)
{
var parsmeterArray = this.GetParameters(parameters);
this.Context.InitMappingInfo<T>();
var builder = InstanceFactory.GetSqlbuilder(this.Context.CurrentConnectionConfig);
builder.SqlQueryBuilder.sql.Append(sql);
if (parsmeterArray != null && parsmeterArray.Any())
builder.SqlQueryBuilder.Parameters.AddRange(parsmeterArray);
using (var dataReader =await this.GetDataReaderNoCloseAsync(builder.SqlQueryBuilder.ToSqlString(), builder.SqlQueryBuilder.Parameters.ToArray()))
{
List<T> result =await this.DbBind.DataReaderToListNoUsingAsync<T>(typeof(T), dataReader);
NextResult(dataReader);
List<T2> result2 =await this.DbBind.DataReaderToListNoUsingAsync<T2>(typeof(T2), dataReader);
NextResult(dataReader);
List<T3> result3 =await this.DbBind.DataReaderToListNoUsingAsync<T3>(typeof(T3), dataReader);
NextResult(dataReader);
List<T4> result4 =await this.DbBind.DataReaderToListNoUsingAsync<T4>(typeof(T4), dataReader);
builder.SqlQueryBuilder.Clear();
if (this.Context.Ado.DataReaderParameters != null)
{
foreach (IDataParameter item in this.Context.Ado.DataReaderParameters)
{
var parameter = parsmeterArray.FirstOrDefault(it => item.ParameterName.Substring(1) == it.ParameterName.Substring(1));
if (parameter != null)
{
parameter.Value = item.Value;
}
}
this.Context.Ado.DataReaderParameters = null;
}
return Tuple.Create<List<T>, List<T2>, List<T3>, List<T4>>(result, result2, result3, result4);
}
}
public async Task<Tuple<List<T>, List<T2>, List<T3>, List<T4>, List<T5>>> SqlQueryAsync<T, T2, T3, T4, T5>(string sql, object parameters = null)
{
var parsmeterArray = this.GetParameters(parameters);
this.Context.InitMappingInfo<T>();
var builder = InstanceFactory.GetSqlbuilder(this.Context.CurrentConnectionConfig);
builder.SqlQueryBuilder.sql.Append(sql);
if (parsmeterArray != null && parsmeterArray.Any())
builder.SqlQueryBuilder.Parameters.AddRange(parsmeterArray);
using (var dataReader = await this.GetDataReaderNoCloseAsync(builder.SqlQueryBuilder.ToSqlString(), builder.SqlQueryBuilder.Parameters.ToArray()))
{
List<T> result = await this.DbBind.DataReaderToListNoUsingAsync<T>(typeof(T), dataReader);
NextResult(dataReader);
List<T2> result2 = await this.DbBind.DataReaderToListNoUsingAsync<T2>(typeof(T2), dataReader);
NextResult(dataReader);
List<T3> result3 = await this.DbBind.DataReaderToListNoUsingAsync<T3>(typeof(T3), dataReader);
NextResult(dataReader);
List<T4> result4 = await this.DbBind.DataReaderToListNoUsingAsync<T4>(typeof(T4), dataReader);
NextResult(dataReader);
List<T5> result5 = await this.DbBind.DataReaderToListNoUsingAsync<T5>(typeof(T5), dataReader);
builder.SqlQueryBuilder.Clear();
if (this.Context.Ado.DataReaderParameters != null)
{
foreach (IDataParameter item in this.Context.Ado.DataReaderParameters)
{
var parameter = parsmeterArray.FirstOrDefault(it => item.ParameterName.Substring(1) == it.ParameterName.Substring(1));
if (parameter != null)
{
parameter.Value = item.Value;
}
}
this.Context.Ado.DataReaderParameters = null;
}
return Tuple.Create<List<T>, List<T2>, List<T3>, List<T4>, List<T5>>(result, result2, result3, result4, result5);
}
}
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 parsmeterArray = this.GetParameters(parameters);
this.Context.InitMappingInfo<T>();
var builder = InstanceFactory.GetSqlbuilder(this.Context.CurrentConnectionConfig);
builder.SqlQueryBuilder.sql.Append(sql);
if (parsmeterArray != null && parsmeterArray.Any())
builder.SqlQueryBuilder.Parameters.AddRange(parsmeterArray);
using (var dataReader =await this.GetDataReaderNoCloseAsync(builder.SqlQueryBuilder.ToSqlString(), builder.SqlQueryBuilder.Parameters.ToArray()))
{
List<T> result =await this.DbBind.DataReaderToListNoUsingAsync<T>(typeof(T), dataReader);
NextResult(dataReader);
List<T2> result2 =await this.DbBind.DataReaderToListNoUsingAsync<T2>(typeof(T2), dataReader);
NextResult(dataReader);
List<T3> result3 =await this.DbBind.DataReaderToListNoUsingAsync<T3>(typeof(T3), dataReader);
NextResult(dataReader);
List<T4> result4 =await this.DbBind.DataReaderToListNoUsingAsync<T4>(typeof(T4), dataReader);
NextResult(dataReader);
List<T5> result5 =await this.DbBind.DataReaderToListNoUsingAsync<T5>(typeof(T5), dataReader);
NextResult(dataReader);
List<T6> result6 =await this.DbBind.DataReaderToListNoUsingAsync<T6>(typeof(T6), dataReader);
builder.SqlQueryBuilder.Clear();
if (this.Context.Ado.DataReaderParameters != null)
{
foreach (IDataParameter item in this.Context.Ado.DataReaderParameters)
{
var parameter = parsmeterArray.FirstOrDefault(it => item.ParameterName.Substring(1) == it.ParameterName.Substring(1));
if (parameter != null)
{
parameter.Value = item.Value;
}
}
this.Context.Ado.DataReaderParameters = null;
}
return Tuple.Create<List<T>, List<T2>, List<T3>, List<T4>, List<T5>, List<T6>>(result, result2, result3, result4, result5, result6);
}
}
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)
{
var parsmeterArray = this.GetParameters(parameters);
this.Context.InitMappingInfo<T>();
var builder = InstanceFactory.GetSqlbuilder(this.Context.CurrentConnectionConfig);
builder.SqlQueryBuilder.sql.Append(sql);
if (parsmeterArray != null && parsmeterArray.Any())
builder.SqlQueryBuilder.Parameters.AddRange(parsmeterArray);
using (var dataReader =await this.GetDataReaderNoCloseAsync(builder.SqlQueryBuilder.ToSqlString(), builder.SqlQueryBuilder.Parameters.ToArray()))
{
List<T> result = await this.DbBind.DataReaderToListNoUsingAsync<T>(typeof(T), dataReader);
NextResult(dataReader);
List<T2> result2 = await this.DbBind.DataReaderToListNoUsingAsync<T2>(typeof(T2), dataReader);
NextResult(dataReader);
List<T3> result3 = await this.DbBind.DataReaderToListNoUsingAsync<T3>(typeof(T3), dataReader);
NextResult(dataReader);
List<T4> result4 = await this.DbBind.DataReaderToListNoUsingAsync<T4>(typeof(T4), dataReader);
NextResult(dataReader);
List<T5> result5 = await this.DbBind.DataReaderToListNoUsingAsync<T5>(typeof(T5), dataReader);
NextResult(dataReader);
List<T6> result6 = await this.DbBind.DataReaderToListNoUsingAsync<T6>(typeof(T6), dataReader);
NextResult(dataReader);
List<T7> result7 = await this.DbBind.DataReaderToListNoUsingAsync<T7>(typeof(T7), dataReader);
builder.SqlQueryBuilder.Clear();
if (this.Context.Ado.DataReaderParameters != null)
{
foreach (IDataParameter item in this.Context.Ado.DataReaderParameters)
{
var parameter = parsmeterArray.FirstOrDefault(it => item.ParameterName.Substring(1) == it.ParameterName.Substring(1));
if (parameter != null)
{
parameter.Value = item.Value;
}
}
this.Context.Ado.DataReaderParameters = null;
}
return Tuple.Create<List<T>, List<T2>, List<T3>, List<T4>, List<T5>, List<T6>, List<T7>>(result, result2, result3, result4, result5, result6, result7);
}
}
private static void NextResult(IDataReader dataReader)
{
try

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

@ -244,6 +244,25 @@ namespace SqlSugar
return GetEntityList<T>(Context, dataReader);
}
}
public virtual Task<List<T>> DataReaderToListNoUsingAsync<T>(Type type, IDataReader dataReader)
{
if (type.Name.Contains("KeyValuePair"))
{
return GetKeyValueListAsync<T>(type, dataReader);
}
else if (type.IsValueType() || type == UtilConstants.StringType || type == UtilConstants.ByteArrayType)
{
return GetValueTypeListAsync<T>(type, dataReader);
}
else if (type.IsArray)
{
return GetArrayListAsync<T>(type, dataReader);
}
else
{
return GetEntityListAsync<T>(Context, dataReader);
}
}
#endregion
#region Throw rule

35
Src/Asp.Net/SqlSugar/Abstract/SugarProvider/SqlSugarProvider.cs

@ -802,64 +802,57 @@ namespace SqlSugar
{
return SaveQueuesProvider(isTran, (sql, parameters) => { return this.Ado.SqlQuery<T>(sql, parameters); });
}
public Task<List<T>> SaveQueuesAsync<T>(bool isTran = true)
public async Task<List<T>> SaveQueuesAsync<T>(bool isTran = true)
{
var result = Task.FromResult(SaveQueues<T>(isTran));
return result;
return await SaveQueuesProvider(isTran,async (sql, parameters) => { return await this.Ado.SqlQueryAsync<T>(sql, parameters); });
}
public Tuple<List<T>, List<T2>> SaveQueues<T, T2>(bool isTran = true)
{
return SaveQueuesProvider(isTran, (sql, parameters) => { return this.Ado.SqlQuery<T, T2>(sql, parameters); });
}
public Task<Tuple<List<T>, List<T2>>> SaveQueuesAsync<T, T2>(bool isTran = true)
public async Task<Tuple<List<T>, List<T2>>> SaveQueuesAsync<T, T2>(bool isTran = true)
{
var result = Task.FromResult(SaveQueues<T,T2>(isTran));
return result;
return await SaveQueuesProvider(isTran,async (sql, parameters) => { return await this.Ado.SqlQueryAsync<T, T2>(sql, parameters); });
}
public Tuple<List<T>, List<T2>, List<T3>> SaveQueues<T, T2, T3>(bool isTran = true)
{
return SaveQueuesProvider(isTran, (sql, parameters) => { return this.Ado.SqlQuery<T, T2, T3>(sql, parameters); });
}
public Task<Tuple<List<T>, List<T2>, List<T3>>> SaveQueuesAsync<T, T2, T3>(bool isTran = true)
public async Task<Tuple<List<T>, List<T2>, List<T3>>> SaveQueuesAsync<T, T2, T3>(bool isTran = true)
{
var result = Task.FromResult(SaveQueues<T, T2,T3>(isTran));
return result;
return await SaveQueuesProvider(isTran, async(sql, parameters) => { return await this.Ado.SqlQueryAsync<T, T2, T3>(sql, parameters); });
}
public Tuple<List<T>, List<T2>, List<T3>, List<T4>> SaveQueues<T, T2, T3, T4>(bool isTran = true)
{
return SaveQueuesProvider(isTran, (sql, parameters) => { return this.Ado.SqlQuery<T, T2, T3, T4>(sql, parameters); });
}
public Task<Tuple<List<T>, List<T2>, List<T3>, List<T4>>> SaveQueuesAsync<T, T2, T3, T4>(bool isTran = true)
public async Task<Tuple<List<T>, List<T2>, List<T3>, List<T4>>> SaveQueuesAsync<T, T2, T3, T4>(bool isTran = true)
{
var result = Task.FromResult(SaveQueues<T, T2, T3,T4>(isTran));
return result;
return await SaveQueuesProvider(isTran,async (sql, parameters) => { return await this.Ado.SqlQueryAsync<T, T2, T3, T4>(sql, parameters); });
}
public Tuple<List<T>, List<T2>, List<T3>, List<T4>, List<T5>> SaveQueues<T, T2, T3, T4, T5>(bool isTran = true)
{
return SaveQueuesProvider(isTran, (sql, parameters) => { return this.Ado.SqlQuery<T, T2, T3, T4, T5>(sql, parameters); });
}
public Task<Tuple<List<T>, List<T2>, List<T3>, List<T4>, List<T5>>> SaveQueuesAsync<T, T2, T3, T4, T5>(bool isTran = true)
public async Task<Tuple<List<T>, List<T2>, List<T3>, List<T4>, List<T5>>> SaveQueuesAsync<T, T2, T3, T4, T5>(bool isTran = true)
{
var result = Task.FromResult(SaveQueues<T, T2, T3, T4,T5>(isTran));
return result;
return await SaveQueuesProvider(isTran,async (sql, parameters) => { return await this.Ado.SqlQueryAsync<T, T2, T3, T4, T5>(sql, parameters); });
}
public Tuple<List<T>, List<T2>, List<T3>, List<T4>, List<T5>, List<T6>> SaveQueues<T, T2, T3, T4, T5, T6>(bool isTran = true)
{
return SaveQueuesProvider(isTran, (sql, parameters) => { return this.Ado.SqlQuery<T, T2, T3, T4, T5, T6>(sql, parameters); });
}
public Task<Tuple<List<T>, List<T2>, List<T3>, List<T4>, List<T5>, List<T6>>> SaveQueuesAsync<T, T2, T3, T4, T5, T6>(bool isTran = true)
public async Task<Tuple<List<T>, List<T2>, List<T3>, List<T4>, List<T5>, List<T6>>> SaveQueuesAsync<T, T2, T3, T4, T5, T6>(bool isTran = true)
{
var result = Task.FromResult(SaveQueues<T, T2, T3, T4, T5,T6>(isTran));
return result;
return await SaveQueuesProvider(isTran,async (sql, parameters) => { return await this.Ado.SqlQueryAsync<T, T2, T3, T4, T5, T6>(sql, parameters); });
}
public Tuple<List<T>, List<T2>, List<T3>, List<T4>, List<T5>, List<T6>, List<T7>> SaveQueues<T, T2, T3, T4, T5, T6, T7>(bool isTran = true)
{
return SaveQueuesProvider(isTran, (sql, parameters) => { return this.Ado.SqlQuery<T, T2, T3, T4, T5, T6, T7>(sql, parameters); });
}
public Task<Tuple<List<T>, List<T2>, List<T3>, List<T4>, List<T5>, List<T6>, List<T7>>> SaveQueuesAsync<T, T2, T3, T4, T5, T6, T7>(bool isTran = true)
public async Task<Tuple<List<T>, List<T2>, List<T3>, List<T4>, List<T5>, List<T6>, List<T7>>> SaveQueuesAsync<T, T2, T3, T4, T5, T6, T7>(bool isTran = true)
{
var result = Task.FromResult(SaveQueues<T, T2, T3, T4, T5, T6,T7>(isTran));
return result;
return await SaveQueuesProvider(isTran,async (sql, parameters) => { return await this.Ado.SqlQueryAsync<T, T2, T3, T4, T5, T6, T7>(sql, parameters); });
}
public void AddQueue(string sql, object parsmeters=null)
{

39
Src/Asp.Net/SqlSugar/Abstract/UpdateProvider/UpdateableProvider.cs

@ -191,7 +191,6 @@ namespace SqlSugar
}
public IUpdateable<T> UpdateColumns(Expression<Func<T, object>> columns)
{
var updateColumns = UpdateBuilder.GetExpressionValue(columns, ResolveExpressType.ArraySingle).GetResultArray().Select(it => this.SqlBuilder.GetNoTranslationColumnName(it)).ToList();
@ -598,43 +597,7 @@ namespace SqlSugar
this.Context.MappingTables = OldMappingTableList;
}
}
//private void TaskStart<Type>(Task<Type> result)
//{
// if (this.Context.CurrentConnectionConfig.IsShardSameThread)
// {
// Check.Exception(true, "IsShardSameThread=true can't be used async method");
// }
// result.Start();
//}
//private IUpdateable<T> CopyUpdateable()
//{
// var asyncContext = this.Context.Utilities.CopyContext(true);
// asyncContext.CurrentConnectionConfig.IsAutoCloseConnection = true;
// asyncContext.IsAsyncMethod = true;
// var asyncUpdateable = asyncContext.Updateable<T>(this.UpdateObjs);
// var asyncUpdateableBuilder = asyncUpdateable.UpdateBuilder;
// asyncUpdateableBuilder.DbColumnInfoList = this.UpdateBuilder.DbColumnInfoList;
// asyncUpdateableBuilder.IsNoUpdateNull = this.UpdateBuilder.IsNoUpdateNull;
// asyncUpdateableBuilder.Parameters = this.UpdateBuilder.Parameters;
// asyncUpdateableBuilder.sql = this.UpdateBuilder.sql;
// asyncUpdateableBuilder.WhereValues = this.UpdateBuilder.WhereValues;
// asyncUpdateableBuilder.TableWithString = this.UpdateBuilder.TableWithString;
// asyncUpdateableBuilder.TableName = this.UpdateBuilder.TableName;
// asyncUpdateableBuilder.PrimaryKeys = this.UpdateBuilder.PrimaryKeys;
// asyncUpdateableBuilder.IsOffIdentity = this.UpdateBuilder.IsOffIdentity;
// asyncUpdateableBuilder.SetValues = this.UpdateBuilder.SetValues;
// if (this.IsWhereColumns)
// {
// (asyncUpdateable as UpdateableProvider<T>).WhereColumnList = this.WhereColumnList;
// (asyncUpdateable as UpdateableProvider<T>).IsWhereColumns = this.IsWhereColumns;
// }
// if (this.RemoveCacheFunc != null)
// {
// asyncUpdateable.RemoveDataCache();
// }
// return asyncUpdateable;
//}
private void ValidateVersion()
{

6
Src/Asp.Net/SqlSugar/Interface/IAdo.cs

@ -89,6 +89,12 @@ namespace SqlSugar
Tuple<List<T>, List<T2>, List<T3>, List<T4>, List<T5>> SqlQuery<T, T2, T3, T4,T5>(string sql, object parameters = null);
Tuple<List<T>, List<T2>, List<T3>, List<T4>, List<T5>, List<T6>> SqlQuery<T, T2, T3, T4, T5,T6>(string sql, object parameters = null);
Tuple<List<T>, List<T2>, List<T3>, List<T4>, List<T5>, List<T6>, List<T7>> SqlQuery<T, T2, T3, T4, T5, T6,T7>(string sql, object parameters = null);
Task<Tuple<List<T>, List<T2>>> SqlQueryAsync<T, T2>(string sql, object parameters = null);
Task<Tuple<List<T>, List<T2>, List<T3>>> SqlQueryAsync<T, T2, T3>(string sql, object parameters = null);
Task<Tuple<List<T>, List<T2>, List<T3>, List<T4>>> SqlQueryAsync<T, T2, T3, T4>(string sql, object parameters = null);
Task<Tuple<List<T>, List<T2>, List<T3>, List<T4>, List<T5>>> SqlQueryAsync<T, T2, T3, T4, T5>(string sql, object parameters = null);
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);
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);
List<T> SqlQuery<T>(string sql, object parameters = null);
List<T> SqlQuery<T>(string sql, params SugarParameter[] parameters);

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

@ -25,6 +25,7 @@ namespace SqlSugar
List<T> DataReaderToList<T>(Type type, IDataReader reader);
Task<List<T>> DataReaderToListAsync<T>(Type entityType, IDataReader dataReader);
List<T> DataReaderToListNoUsing<T>(Type type, IDataReader reader);
Task<List<T>> DataReaderToListNoUsingAsync<T>(Type type, IDataReader reader);
}
}

Loading…
Cancel
Save