AI OnAI Off
The solution is the following:
ClubQuery query = new ClubQuery(); CriteriaGroup group = new CriteriaGroup(); StringCriterion nameCriterion = new StringCriterion(); nameCriterion.Value = txtClubsSearch.Text; nameCriterion.WildCardType = WildCardType.Both; query.Name = nameCriterion; StringCriterion descriptionCriterion = new StringCriterion(); descriptionCriterion.Value = txtClubsSearch.Text; descriptionCriterion.WildCardType = WildCardType.Both; query.Description = descriptionCriterion; group.AddCriterion(LogicalOperator.Or, nameCriterion); group.AddCriterion(LogicalOperator.Or, descriptionCriterion); query.AddCriteriaGroup(group); ClubCollection clubs = ClubHandler.GetQueryResult(query);
Is it possible to do an OR search in ClubHandler.GetQueryResult?
The following code is doing an AND search:
So the question is how this can be changed to return clubs that contain the given text in either the name or the description.
/René