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.
@@ -18,6 +18,7 @@ namespace OrmTest
|
||||
{
|
||||
string id = "1";
|
||||
Expression<Func<Student, bool>> exp = it => it.Name!=id;
|
||||
// Expression<Func<Student, object>> exp = it => it.Name;
|
||||
ExpressionContext expContext = new ExpressionContext(exp, ResolveExpressType.Single);
|
||||
// var x = expContext.GetFiledName();
|
||||
var xx = expContext.ToSqlString();
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -11,16 +11,8 @@ namespace SqlSugar
|
||||
{
|
||||
LambdaExpression lambda = base.Expression as LambdaExpression;
|
||||
var expression = lambda.Body;
|
||||
if (expression.NodeType == ExpressionType.MemberAccess)
|
||||
{
|
||||
string appendString = "(" +((MemberExpression)expression).Member.Name + "=1)";
|
||||
base.Context.SqlWhere.Append(appendString);
|
||||
}
|
||||
else
|
||||
{
|
||||
base.Expression = expression;
|
||||
base.Start();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user