This commit is contained in:
sunkaixuan
2017-01-07 22:26:44 +08:00
parent 3363b2aa91
commit 60eff8e71e
16 changed files with 33 additions and 4 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -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>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

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

View File

@@ -9,7 +9,7 @@ namespace SqlSugar
{
public BinaryExpressionResolve(Expression exp) : base(exp)
{
base.Continue();
}
}
}

View File

@@ -9,7 +9,15 @@ namespace SqlSugar
{
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();
}
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.