I am trying to change a few fields on an autoquery to query using or (it is a search box that is searching many fields). This doesn't seem to work although according to the documentation it should.
public class PropertyGet : QueryDb<DomainModel.Property>
{
[QueryDbField(Term=QueryTerm.Or)]
public string NameContains { get; set; }
[QueryDbField(Term=QueryTerm.Or)]
public string CityContains {get;set;}
}
However this does:
[QueryDb(QueryTerm.Or)]
public class PropertyGet : QueryDb<DomainModel.Property>
{
public string NameContains { get; set; }
public string CityContains {get;set;}
}
Changing Querying Behavior
By default queries act like a filter and every condition is combined with AND boolean term to further filter the result-set. This can be changed to use an OR at the field-level by specifying Term=QueryTerm.Or modifier, e.g:
[QueryDbField(Term=QueryTerm.Or)] public string LastName { get; set; }
How can I do a field level Or query?