I have a legacy quote system that has a table for “Quotes” and a related table for “QuoteLineItems”.
How do I search the “QuoteLineItems”?
I have tried the below:
allrecords.Where(s =>
s.ClientsName.ToLower().Contains(search) ||
s.QuoteLineItems.Select(xd => xd.Description.ToLower()).Contains(search) ||
s.QuoteID == quoteID);
The search only matches the exact word but does not match if there is anything before or after the search word.
Example, if I search for “Test” then any QuoteLineItem with only the word “Test” in the description is found, but the search does find the word “Test” if the description has additional text like “1 Test” or “Test 1”.
*NOTE: The ClientsName search works perfectly.