@ -332,6 +332,7 @@ namespace OrmTest.Demo
{
var db = GetInstance();
var t1 = db.Queryable<Student>().Where(it => SqlFunc.ToLower(it.Name) == SqlFunc.ToLower("JACK")).ToList();
var t2 = db.Queryable<Student>().Where(it => SqlFunc.IsNull(it.Name, "nullvalue") == "nullvalue").ToList();
//SELECT [Id],[SchoolId],[Name],[CreateTime] FROM [Student] WHERE ((LOWER([Name])) = (LOWER(@MethodConst0)) )
/***More Functions***/
@ -123,5 +123,11 @@ namespace SqlSugar
return " concat("+string.Join(",", strings).Replace("+", "") + ") ";
}
public override string IsNull(MethodCallExpressionModel model)
var parameter = model.Args[0];
var parameter1 = model.Args[1];
return string.Format("IFNULL({0},{1})", parameter.MemberName, parameter1.MemberName);