Browse Source

-

pull/12/MERGE
610262374@qq.com 8 years ago
parent
commit
bd3ab62235
  1. 10
      OrmTest/Program.cs
  2. 6
      SqlSugar/Abstract/QueryableProvider/QueryableAccessory.cs

10
OrmTest/Program.cs

@ -17,11 +17,11 @@ namespace OrmTest
{
//Unit Test
int eachCount = 10;
//new Field(eachCount).Init();
//new Where(eachCount).Init();
//new Method(eachCount).Init();
//new JoinQuery(eachCount).Init();
//new SingleQuery(eachCount).Init();
new Field(eachCount).Init();
new Where(eachCount).Init();
new Method(eachCount).Init();
new JoinQuery(eachCount).Init();
new SingleQuery(eachCount).Init();
new SelectQuery(eachCount).Init();
}
}

6
SqlSugar/Abstract/QueryableProvider/QueryableAccessory.cs

@ -10,7 +10,7 @@ namespace SqlSugar
public class QueryableAccessory
{
protected List<SugarParameter> _Pars;
protected List<SugarParameter> Pars
protected List<SugarParameter> BasePars
{
get
{
@ -24,7 +24,7 @@ namespace SqlSugar
{
var sqlParsArray = context.Database.GetParameters(whereObj);
if (sqlParsArray != null)
this.Pars.AddRange(sqlParsArray);
this.BasePars.AddRange(sqlParsArray);
}
protected void AddPars(List<SugarParameter> pars, SqlSugarClient context)
{
@ -36,7 +36,7 @@ namespace SqlSugar
{
ILambdaExpressions resolveExpress = context.LambdaExpressions;
resolveExpress.Resolve(expression, type);
Pars.AddRange(resolveExpress.Parameters);
BasePars.AddRange(resolveExpress.Parameters);
builder.LambadaQueryBuilder.WhereInfos.Add(builder.AppendWhereOrAnd(builder.LambadaQueryBuilder.WhereInfos.IsNullOrEmpty(),resolveExpress.Result.GetResultString()));
resolveExpress.Clear();
}

Loading…
Cancel
Save