Query Dynamic Content with Multiple Related Data Items
I was referring to this article for querying dynamic content with related data: docs.sitefinity.com/example-query-dynamic-content-by-related-data
This is all well and good, but currently I am dealing with this scenario:
I have a custom content item of Human, and two related data items of type Hair Color and Eye Color (these are just example types of course)
Suppose I wanted to query all Human items with Hazel eyes and black hair, how can I do that in a clean way?
I came up with a hacky solution, but I need something that will work with either no related data query needed, or with one or both (all combinations)
Is there a tried and true way of doing this with Sitefinity's native API? Code samples would be much appreciated thank you :)