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 All, Can anyone tell me if they have an idea how I can do a reversed LIKE in LINQ or Query Objects? I have a column that has LIKE values and based on a searchable value I want to say, find me instances where this searchable value matches a range of LIKE values. In SQL I would do this: SELECT * FROM Variants v WHERE 'Some search value' LIKE(v.Value) v.Value = a field containing a LIKE pattern. There maybe a different way of doing it from a coding perspective but I need to find all variants that are like a supplied search value. Thanks, Jim |
|
|
You wont be able to craft a query using LINQ or Query Objects to match this syntax, for this type of query you will either need to use a stored procedure or use the .RawSql property on your Query object to express the query or you can use UnitOfWork.FindBySql to similar effect.
|
|