mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-10-15 18:55:07 +08:00
-
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
11
OrmTest/bin/Debug/OrmTest.vshost.exe.manifest
Normal file
11
OrmTest/bin/Debug/OrmTest.vshost.exe.manifest
Normal 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.
Binary file not shown.
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -5,11 +5,11 @@ using System.Linq.Expressions;
|
||||
using System.Text;
|
||||
namespace SqlSugar
|
||||
{
|
||||
public class BinaryExpressionResolve:BaseResolve
|
||||
public class BinaryExpressionResolve : BaseResolve
|
||||
{
|
||||
public BinaryExpressionResolve(Expression exp) : base(exp)
|
||||
{
|
||||
|
||||
base.Continue();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -5,11 +5,19 @@ using System.Linq.Expressions;
|
||||
using System.Text;
|
||||
namespace SqlSugar
|
||||
{
|
||||
public class LambdaExpressionResolve: BaseResolve
|
||||
public class LambdaExpressionResolve : BaseResolve
|
||||
{
|
||||
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.
Reference in New Issue
Block a user