Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
so I am having a custom search form, basically the user types in a keyword and I search the collection of Persons based on his properties and if they contain the keyword.
So user types in "Berlin" and I filter all persons which contain the keyword in there property:
var filteredMedia = Model.Persons.Where(x => x.GetPropertyValue<string>("city").ToUpper().Contains(searchTerm.ToUpper())).Reverse();
So this works great with normal text string fields, but if I use the repeatable string, then I have a problem. I can't use the GetPropertyValue
I am currently fixed this by doing it the "manual" way, getting the collection and filter out the ones through two for each loops, but I am afraid that could be a bit slow.
Any Ideas how I could filter out the repeatable strings directly throught Linq?
Repeatable text string should return an array so updating your where clause to -
I would also recommend null checking x in case someone unpublished a Person that is selected.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted