Browse Source

-

pull/12/MERGE
sunkaixuan 8 years ago
parent
commit
60eff8e71e
  1. BIN
      .vs/SqlSugar/v14/.suo
  2. BIN
      OrmTest/bin/Debug/OrmTest.exe
  3. BIN
      OrmTest/bin/Debug/OrmTest.pdb
  4. 11
      OrmTest/bin/Debug/OrmTest.vshost.exe.manifest
  5. BIN
      OrmTest/bin/Debug/SqlSugar.dll
  6. BIN
      OrmTest/bin/Debug/SqlSugar.pdb
  7. BIN
      OrmTest/obj/Debug/OrmTest.csprojResolveAssemblyReference.cache
  8. BIN
      OrmTest/obj/Debug/OrmTest.exe
  9. BIN
      OrmTest/obj/Debug/OrmTest.pdb
  10. 10
      SqlSugar/Expressions/ExpItems/BaseResolve.cs
  11. 4
      SqlSugar/Expressions/ExpItems/BinaryExpressionResolve.cs
  12. 12
      SqlSugar/Expressions/ExpItems/LambdaExpressionResolve.cs
  13. BIN
      SqlSugar/bin/Debug/SqlSugar.dll
  14. BIN
      SqlSugar/bin/Debug/SqlSugar.pdb
  15. BIN
      SqlSugar/obj/Debug/SqlSugar.dll
  16. 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.

11
OrmTest/bin/Debug/OrmTest.vshost.exe.manifest

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>

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.

10
SqlSugar/Expressions/ExpItems/BaseResolve.cs

@ -10,6 +10,8 @@ namespace SqlSugar
protected Expression Expression { get; set; } protected Expression Expression { get; set; }
public ExpressionContext Context { get; set; } public ExpressionContext Context { get; set; }
public string SqlWhere { get; set; } public string SqlWhere { get; set; }
public bool IsFinished { get; set; }
private BaseResolve() private BaseResolve()
{ {
@ -21,6 +23,7 @@ namespace SqlSugar
public BaseResolve Start() public BaseResolve Start()
{ {
this.IsFinished = false;
Expression exp = this.Expression; Expression exp = this.Expression;
if (exp is LambdaExpression) if (exp is LambdaExpression)
{ {
@ -60,5 +63,12 @@ namespace SqlSugar
} }
return null; return null;
} }
public void Continue()
{
if (!IsFinished)
{
this.Start();
}
}
} }
} }

4
SqlSugar/Expressions/ExpItems/BinaryExpressionResolve.cs

@ -5,11 +5,11 @@ using System.Linq.Expressions;
using System.Text; using System.Text;
namespace SqlSugar namespace SqlSugar
{ {
public class BinaryExpressionResolve:BaseResolve public class BinaryExpressionResolve : BaseResolve
{ {
public BinaryExpressionResolve(Expression exp) : base(exp) public BinaryExpressionResolve(Expression exp) : base(exp)
{ {
base.Continue();
} }
} }
} }

12
SqlSugar/Expressions/ExpItems/LambdaExpressionResolve.cs

@ -5,11 +5,19 @@ using System.Linq.Expressions;
using System.Text; using System.Text;
namespace SqlSugar namespace SqlSugar
{ {
public class LambdaExpressionResolve: BaseResolve public class LambdaExpressionResolve : BaseResolve
{ {
public LambdaExpressionResolve(Expression exp) : base(exp) public LambdaExpressionResolve(Expression exp) : base(exp)
{ {
LambdaExpression lambda = exp as LambdaExpression;
var expression = lambda.Body;
if (expression.NodeType == ExpressionType.MemberAccess)
{
base.SqlWhere = "(" + ((MemberExpression)expression).Member.Name + "=1)";
base.IsFinished = true;
}
base.Expression = expression;
base.Continue();
} }
} }
} }

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