Continuing with the LINQ tips, today we provide a list of System.Math methods that we are going to support with the upcoming Q3 release.
The following table shows the supported methods; when no indication is given, all the overloaded (double,decimal,...) versions will work.

Abs
Min
Max
Acos, Asin, Atan, Atan2
Cos,Sin,Tan
Cosh, Sinh, Tanh
Sqrt
Power
Trunc
Exp
Log(double)
Log10
Ceil
Floor
Round (*)
Sign

 

(*) Only the Round(double) and Round(x,y) methods where y!=MidpointRounding are supported.

 

That means, you can push now many more calculations to the database server.
Be aware however, that using the database server engine might produce different results than would be calculated when the CLR is used; e.g. when an Oracle NUMBER column is used as the storage for a field, the precision used in a calculation involving that column can be different from the CLR precision for the float/double/decimal field.


Comments

Comments are disabled in preview mode.