November Happy Hour will be moved to Thursday December 5th.

How to match by ContentRefrence from Ilist(ContentRefernce ) property using build filder

Vote:
 

Hi,

Any one help me how can match  ContentRefrence  from  Ilist(ContentRefernce ) property using build filder

My code is mentioned below:

private FilterBuilder GetMarketTagFilter(ContentReference contentTypeTags)

{
var filterBuilder = SearchClient.Instance.BuildFilter();
if (contentTypeTags != null)
{

filterBuilder = filterBuilder.Or(x => x.MarketVisible.(contentTypeTags.ID));

}
return filterBuilder;
}

In the above code " MarketVisible" is --Ilist(ContentRefernce ) property

Thanks

Sourav

#175277
Feb 15, 2017 16:20
Vote:
 

Hi!

No need to use the build filter functionality in this case. You coud simply use MatchContained:

.Filter(x => x.MarketVisible.MatchContained(p => p.ID, contentTypeTags.ID))
#175295
Feb 15, 2017 20:08
Vote:
 

Hi Per,

Thanks a lot for your help and support.

Thanks

Sourav

#175526
Feb 22, 2017 16:10
* 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.