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
I'm trying to build a simple dynamic query - so if a user completes cetain fields then these are added to the select - var properties = UnitOfWork.ActiveProperty;
The code works if I explicitly compare the p.bedroomCount == "1", but I need it to compare a min number of bedrooms. The database stores bedrooms as varchar ( not sure why, but I cant change it ). When I run the code above I get an error : The method CompareTo is not supported.
Can anyone please help. - Thanks |
|
|
We'll look at adding support for String.CompareTo, but in the meantime the only way I can think of doing lexical comparisons on strings is to use the Visual Basic string comparison operator instead (because C# doesn't support the < and > operators on strings): // need to add reference to Microsoft.VisualBasic.dll properties = properties.Where(p => Operators.CompareString(c.Title, "H", true) > 0); |
|