score:3

Accepted answer

i don't believe that hasvalue is recognized by linq to entities beause there is no way to convert that into sql. therefore i think in this case, l2e has to execute the query before it can evaluate hasvalue. i haven't seen this particular behavior before. i thk you need to find another way to express your nullability test. and i'd be interested to see the sql.

here's one interesting idea: http://social.msdn.microsoft.com/forums/en/csharplanguage/thread/56484ed7-9664-44f4-84a0-69da3901c817

there are all kind of weird behaviors with linq around nullables so you have to really pay attention to the results -> http://msdn.microsoft.com/en-us/library/bb738687.aspx

hth julie


Related Query

More Query from same tag