Browse Source

-

pull/12/MERGE
sunkaixuan 8 years ago
parent
commit
60abab241e
  1. BIN
      .vs/SqlSugar/v14/.suo
  2. BIN
      OrmTest/bin/Debug/OrmTest.exe
  3. BIN
      OrmTest/bin/Debug/OrmTest.pdb
  4. BIN
      OrmTest/bin/Debug/SqlSugar.dll
  5. BIN
      OrmTest/bin/Debug/SqlSugar.pdb
  6. BIN
      OrmTest/obj/Debug/OrmTest.csprojResolveAssemblyReference.cache
  7. BIN
      OrmTest/obj/Debug/OrmTest.exe
  8. BIN
      OrmTest/obj/Debug/OrmTest.pdb
  9. 1
      SqlSugar/ExpressionsToSql/Common/ExpressionParameter.cs
  10. 6
      SqlSugar/ExpressionsToSql/ResolveItems/ConstantExpressionResolve.cs
  11. 5
      SqlSugar/ExpressionsToSql/ResolveItems/MemberInitExpressionResolve.cs
  12. BIN
      SqlSugar/bin/Debug/SqlSugar.dll
  13. BIN
      SqlSugar/bin/Debug/SqlSugar.pdb
  14. BIN
      SqlSugar/obj/Debug/SqlSugar.dll
  15. BIN
      SqlSugar/obj/Debug/SqlSugar.pdb

BIN
.vs/SqlSugar/v14/.suo

Binary file not shown.

BIN
OrmTest/bin/Debug/OrmTest.exe

Binary file not shown.

BIN
OrmTest/bin/Debug/OrmTest.pdb

Binary file not shown.

BIN
OrmTest/bin/Debug/SqlSugar.dll

Binary file not shown.

BIN
OrmTest/bin/Debug/SqlSugar.pdb

Binary file not shown.

BIN
OrmTest/obj/Debug/OrmTest.csprojResolveAssemblyReference.cache

Binary file not shown.

BIN
OrmTest/obj/Debug/OrmTest.exe

Binary file not shown.

BIN
OrmTest/obj/Debug/OrmTest.pdb

Binary file not shown.

1
SqlSugar/ExpressionsToSql/Common/ExpressionParameter.cs

@ -14,6 +14,7 @@ namespace SqlSugar
public Expression BaseExpression { get; set; }
public int Index { get; set; }
public List<KeyValuePair<string, BinaryExpressionInfo>> BinaryExpressionInfoList { get; set; }
public object TempDate { get; set; }
public ExpressionParameter BaseParameter { get; set; }
}
}

6
SqlSugar/ExpressionsToSql/ResolveItems/ConstantExpressionResolve.cs

@ -15,10 +15,12 @@ namespace SqlSugar
object value = expression.Value;
switch (parameter.Context.ResolveType)
{
case ResolveExpressType.WhereSingle:
case ResolveExpressType.WhereMultiple:
case ResolveExpressType.SelectSingle:
case ResolveExpressType.SelectMultiple:
parameter.BaseParameter.TempDate = value;
break;
case ResolveExpressType.WhereSingle:
case ResolveExpressType.WhereMultiple:
case ResolveExpressType.FieldSingle:
case ResolveExpressType.FieldMultiple:
default:

5
SqlSugar/ExpressionsToSql/ResolveItems/MemberInitExpressionResolve.cs

@ -46,10 +46,11 @@ namespace SqlSugar
MemberAssignment memberAssignment = (MemberAssignment)binding;
if (memberAssignment.Expression.NodeType == ExpressionType.Constant)
{
var value = ((ConstantExpression)memberAssignment.Expression).Value;
base.Expression = memberAssignment.Expression;
base.Start();
string parameterName = this.Context.SqlParameterKeyWord + "constant" + i;
parameter.Context.Result.Append(parameterName);
this.Context.Parameters.Add(new SugarParameter(parameterName, value));
this.Context.Parameters.Add(new SugarParameter(parameterName, parameter.TempDate));
}
else
{

BIN
SqlSugar/bin/Debug/SqlSugar.dll

Binary file not shown.

BIN
SqlSugar/bin/Debug/SqlSugar.pdb

Binary file not shown.

BIN
SqlSugar/obj/Debug/SqlSugar.dll

Binary file not shown.

BIN
SqlSugar/obj/Debug/SqlSugar.pdb

Binary file not shown.
Loading…
Cancel
Save