Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
AI OnAI Off
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
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é