I have a many to many relationship as follows:
Products ProductID Description
ProductFeatures ProductFeatureID ProductID FeatureID
Features FeatureID Description
Any Product can have many Features.
I then come along with an iQueryable called "SearchFeatures" which contains two particular Feature objects that I want to search on.
I want to find the Products which have ALL of these Features!
E.g. something like this would be nice:
return db.Products.Where(x => x.Features.ContainsAll(SearchFeatures));
What is the cleanest way to achieve this using LINQ?
Many thanks.