I have 'Property' objects with 'BayOption' child objects. I need the site search to search through the child BayOptions as well as the Properties and return Properties if the search criteria matches the child or parent. A Property can have multiple BayOptions (and usually does). I was unsure if .Select or .SelectMany is the trick I need. I have the following so far:
var stringResults = db.Properties .Where(x => x.Address.Contains(id)... (more conditions here...but then BayOptions) || x.BayOptions.Select(g => g.Description).Contains(id) );
But would the .Select here only select one BayOption? (I don't think so, but .SelectMany makes me wonder...) At any rate, I am not getting results for the child objects with this as it is.