Exp to Support Modulo

This commit is contained in:
sunkaixuan
2019-02-09 18:57:31 +08:00
parent bf3cc6fbf5
commit 7ba9656d77
2 changed files with 3 additions and 0 deletions

View File

@@ -418,6 +418,7 @@ namespace OrmTest.Demo
var test28 = db.Queryable<Student>().Select(x => new Student{
Name = x.Name == null ? "1" : "2"
}).ToList();
var test29 = db.Queryable<Student>().Where(it=>it.Id%1==0).ToList();
//var test29 = db.Queryable<Student>().Select(x => new Student
//{
// Name = x.Name??"a"

View File

@@ -41,6 +41,8 @@ namespace SqlSugar
case ExpressionType.Multiply:
case ExpressionType.MultiplyChecked:
return "*";
case ExpressionType.Modulo:
return "%";
case ExpressionType.Coalesce:
throw new Exception("Expression no support ?? ,Use SqlFunc.IsNull");
default: