Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more

MatchContained in Complex Object for multiple conditions

Vote:
 

Hi,

With reference to this article 

https://world.optimizely.com/documentation/Items/Developers-Guide/EPiServer-Find/11/DotNET-Client-API/Searching/Filtering/Complex-objects/ 

It looks like for property of type IEnumerable, MatchContained can not be applied more than once but if the business logic needs to build a query like that then how to achieve , any leads?

for e.g. 

Product 

{

List<Market> market {get;set;}

}

Market

{

string country {get;set}

string available {get;set}

}

Since both the conditions are important, how to apply it? 

(p => p.market.MatchContained(x => x.country , user.country) && (p => p.market.MatchContained(x => x.available, "Yes");

Thanks

#297699
Mar 04, 2023 5:58
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.