mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-24 18:04:52 +08:00
Expression support IsNullOrWhiteSpace
This commit is contained in:
parent
68dec8af24
commit
f62c15d74d
@ -44,6 +44,7 @@ namespace OrmTest
|
||||
var getByFuns2 = db.Queryable<Order>().GroupBy(it => it.Name).Select(it => SqlFunc.AggregateDistinctCount(it.Price)).ToList();
|
||||
var getDicionary = db.Queryable<Order>().ToDictionary(it => it.Id, it => it.Name);
|
||||
var getDicionaryList = db.Queryable<Order>().ToDictionaryList();
|
||||
var getTest = db.Queryable<Order>().Where(it =>string.IsNullOrWhiteSpace( it.Name)).ToList();
|
||||
Console.WriteLine("#### Examples End ####");
|
||||
}
|
||||
|
||||
|
@ -512,6 +512,10 @@ namespace SqlSugar
|
||||
{
|
||||
name = "To" + TempParseType.Name;
|
||||
}
|
||||
else if (name == "IsNullOrWhiteSpace")
|
||||
{
|
||||
name = "IsNullOrEmpty";
|
||||
}
|
||||
switch (name)
|
||||
{
|
||||
case "IIF":
|
||||
@ -696,6 +700,10 @@ namespace SqlSugar
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (expression.Method.Name == "IsNullOrWhiteSpace" && expression.Method.DeclaringType == UtilConstants.StringType)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (expression.Method.ReflectedType().FullName != ExpressionConst.SqlFuncFullName)
|
||||
return false;
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user