This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi Team, I have an order by clause where im trying to produce the sql ORDER BY ISNULL([Client].[FirstName] ,[Client].[LastOrCompanyName]) DESC The code I am writing is OrderBy(c => c.LastOrCompanyName ?? c.FirstName), I am getting a methodnotimplemented expception or simillar error Am I able to acheieve the isnull orderby clause using lightspeed? Thanks, Jay |
|
|
We've spotted a bug with coalescing two columns that means you can't do it at the moment in LINQ. This should be fixed in the next nightly build of LightSpeed 4, available from about 1200 UTC (if you are on LightSpeed 3 and cannot upgrade, let us know). Note however that the ?? operator will be translated to the SQL COALESCE function, not to ISNULL. If you don't want to wait for the nightly, or you absolutely need ISNULL rather than COALESCE, you can do it in the query objects API using the Function() method (and passing "ISNULL" as the function name). Thanks for letting us know about this! |
|
|
Hi Ivan, Thanks for the awesome turn around time, got the nightly build and its working like a charm. Cheers, Jay |
|