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 Guys,
I have been trying to get this to work for a while now but no love. I'm trying to add a conditional statement onto a sql query using the or operator using LINQ, eg: ... || ((criteria.CollateralBancsId > 0) ? m.CollateralId == criteria.CollateralBancsId : false) ...
This is not supported in the Light Speed 3 :-( You can get around this with the and opterator by doing something like: ...
where (!string.IsNullOrEmpty(criteria.Street)) ? blah, blah, CompareMethod.Text) : true where (!string.IsNullOrEmpty(criteria.Suburb)) ? blah, blah, CompareMethod.Text) : true ...
Can I do this with an or??????????
Thanks Again, |
|
|
Looks like we have a bug with conditional operators inside logical expressions. It will be fixed in the next nightly build. |
|