Update unit test

This commit is contained in:
sunkaixuna 2021-09-04 09:32:28 +08:00
parent b0db25a094
commit 71849c5688
3 changed files with 4 additions and 2 deletions

View File

@ -160,6 +160,7 @@ namespace OrmTest
{
throw new Exception("unit query error");
}
db.Queryable<Order>().Where(it => SqlFunc.Round(it.Id, 2) == SqlFunc.Abs(it.Id)).ToList();
}

View File

@ -487,7 +487,8 @@ namespace SqlSugar
public string Round(MethodCallExpressionModel model)
{
var parameter = model.Args[0];
return string.Format(" ROUND({0},{1}) ", parameter.MemberName);
var parameter2= model.Args[1];
return string.Format(" ROUND({0},{1}) ", parameter.MemberName, parameter2.MemberName);
}
}
}

View File

@ -133,7 +133,7 @@ namespace SqlSugar
public static T Abs<T>( T value) { throw new NotSupportedException("Can only be used in expressions"); }
public static string Round<T>(T value,int precision) { throw new NotSupportedException("Can only be used in expressions"); }
public static T Round<T>(T value,int precision) { throw new NotSupportedException("Can only be used in expressions"); }
/// <summary>
/// Subquery