none
Math functions in Linq To Entities RRS feed

Answers

  • Graham, You are right with your analysis. In .Net Framework 3.5 SP1 release, we don't support all the functions because of two reasons:
    1. There is no straight forward CLR transformations for the existing canonical functions and
    2. Not all provider specific functions have an equivalent canonical functions.

    With that said, the Math.Abs function doesn't fall in either of the categories. In the upcoming Beta release of .Net Framework 4.0, we are planning to make it easy to call all the Canonical functions and Sql Server specific functions in LINQ.

    Hope this helps,
    Sushil.
    Disclaimer: This posting is provided "AS IS" with no warranties, and confers no rights
    Thursday, March 26, 2009 4:11 PM

All replies

  • Graham, You are right with your analysis. In .Net Framework 3.5 SP1 release, we don't support all the functions because of two reasons:
    1. There is no straight forward CLR transformations for the existing canonical functions and
    2. Not all provider specific functions have an equivalent canonical functions.

    With that said, the Math.Abs function doesn't fall in either of the categories. In the upcoming Beta release of .Net Framework 4.0, we are planning to make it easy to call all the Canonical functions and Sql Server specific functions in LINQ.

    Hope this helps,
    Sushil.
    Disclaimer: This posting is provided "AS IS" with no warranties, and confers no rights
    Thursday, March 26, 2009 4:11 PM
  • Hi Sushil,

    thanks for your response.

    Just to confirm, am I correct in assuming then that there it is not possible/practical to work around this in V1 by manipulating the expression tree or some other such magic ?

    Regards

    Graham

     

     

    Thursday, March 26, 2009 4:58 PM
  • Unfortunately, I cannot think of any other valid workaround for .Net Framework 3.5 SP1 at this point. using the public APIs.


    Disclaimer: This posting is provided "AS IS" with no warranties, and confers no rights
    Friday, March 27, 2009 10:51 PM