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
|
please help to write code that will return result of following sql expression SELECT * FROM A
i trid using this code var currentTypeID = 0;
but there error: "This expression type is not supported in LightSpeed 3.0" at Mindscape.LightSpeed.Linq.Sqo.CriteriaSqo.ConvertToQueryExpression(LinqQueryPlanExpression plan, Expression expression) |
|
|
Use of constant values (e.g. currentTypeID in the example above) are not currently supported as join criteria, rather you can specify these as part of a where clause. So to refactor what you have above: var currentTypeID = 0;
Jeremy |
|
|
добрый день. |
|
|
No not currently as mentioned in the earlier post, although you could use a stored procedure as an escape hatch in this situation but thats not particularly ideal. I will have a look at whats involved in adding in support for this and let you know if this is something we can try and get in to a nightly sometime soon.
Jeremy |
|
|
Just an additional point - you need to remember that LINQ is not SQL. It is an expression of your intent, and what you want returned, it is not an indication of the SQL that will be generated. This applies across the board for all LINQ providers that talk to a database (LINQ to SQL, Entity Framework, LightSpeed). If you absolutely must have a specific query generated then you should write the SQL as you need it using options like Jeremy suggested. |
|
|
Yes, I understand that LINQ is not SQL. I will use the "escape hatch":) |
|
|
One more thing. I tried to used other way and write the following code |
|