Browse Source

Code optimization

pull/2/head
skx 4 years ago
parent
commit
c21683781d
  1. 2
      Src/Asp.NetCore2/SqlSeverTest/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs
  2. 7
      Src/Asp.NetCore2/SqlSeverTest/SqlSugar/Abstract/SqlBuilderProvider/QueryBuilder.cs

2
Src/Asp.NetCore2/SqlSeverTest/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs

@ -409,7 +409,7 @@ namespace SqlSugar
var whereIndex = QueryBuilder.WhereIndex;
string parameterName = this.SqlBuilder.SqlParameterKeyWord + "InPara" + whereIndex;
this.AddParameters(new SugarParameter(parameterName, inValues[0]));
this.Where(string.Format(QueryBuilder.InTemplate, filed, parameterName));
this.Where(string.Format(QueryBuilder.EqualTemplate, filed, parameterName));
QueryBuilder.WhereIndex++;
}
else

7
Src/Asp.NetCore2/SqlSeverTest/SqlSugar/Abstract/SqlBuilderProvider/QueryBuilder.cs

@ -207,6 +207,13 @@ namespace SqlSugar
return "{0} IN ({1}) ";
}
}
public virtual string EqualTemplate
{
get
{
return "{0} = {1} ";
}
}
#endregion
#region Common Methods

Loading…
Cancel
Save