mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-24 21:13:46 +08:00
Update exp to sql
This commit is contained in:
@@ -269,6 +269,7 @@ namespace SqlSugar
|
||||
_ListCallFunc.Reverse();
|
||||
SqlInfo result = new SqlInfo();
|
||||
result.Parameters = new List<SugarParameter>();
|
||||
var isList = false;
|
||||
foreach (var item in _ListCallFunc)
|
||||
{
|
||||
var method = item as MethodCallExpression;
|
||||
@@ -290,6 +291,7 @@ namespace SqlSugar
|
||||
}
|
||||
else if (method.Method.Name == "ToList")
|
||||
{
|
||||
isList = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -300,10 +302,12 @@ namespace SqlSugar
|
||||
}
|
||||
if (where.Any())
|
||||
{
|
||||
Check.Exception(isList == false, $"{_ListCallFunc.First()} need is ToList()", $"{_ListCallFunc.First()} 需要ToList");
|
||||
result.WhereString= String.Join(" AND ", where);
|
||||
}
|
||||
if (oredrBy.Any())
|
||||
{
|
||||
Check.Exception(isList == false, $"{_ListCallFunc.First()} need is ToList()", $"{_ListCallFunc.First()} 需要ToList");
|
||||
result.OrderByString = String.Join(" , ", oredrBy);
|
||||
}
|
||||
return result;
|
||||
|
Reference in New Issue
Block a user