Enhance AutoQuery to Handle "OR"s in the Template Property of the QueryField Attribute
In my AutoQuery service, one of my request DTOs uses a custom "NameSearch" property with a QueryField attribute with a Template which has ORs in it - "FirstName LIKE {Value} OR LastName LIKE {Value} OR ..." . I also have a boolean property "IsActive" which matches a field in the database table.
When I use these two properties together in a query to the service - "?NameSearch=abc&IsActive=true" - the results contain some people who are inactive. I should have figured this out without a SQL trace, but when I did one, I noticed that this was caused by not having parentheses around the NameSearch Template string (the ORs where the problem).
Of course, the fix is to always place parentheses around any Templates in QueryField attributes, but I wonder if we might "get that for free" so that my sometimes feeble mind doesn't have to remember?
Thanks!
