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
|
Hello! How can I perform correctly calculations in LightSpeed using LINQ? For example
Thanks in advance |
|
|
Unfortunately LightSpeed does not currently support this scenario because it requires performing an operation on a table other than the main one being queried. LightSpeed's projection support is limited to selecting individual columns or properties. Sorry. A possible workaround is to do this in two stages: var intermediate = context.Photo.Select(photo => new { Not very elegant, though, and rather inefficient because it hauls back the entire Ratings collection when all you want is the average rating; but may be viable if your data sets aren't too large. |
|
|
[quote user="ivan"]Unfortunately LightSpeed does not currently support this scenario because it requires performing an operation on a table other than the main one being queried. LightSpeed's projection support is limited to selecting individual columns or properties. Sorry.[/quote] Do you plan to add this functionality? If yes than can I know ETA if there is one? |
|
|
It's something we'd like to do, but there's a fair bit of infrastructural work we'd need to do first, so it's not even planned in at the moment. We'll keep monitoring customer feedback and prioritise accordingly. |
|