Update SearchController.cs
This commit is contained in:
		| @@ -107,10 +107,10 @@ public class SearchController : Controller { | ||||
|                     products.AddRange(cat); | ||||
|                 } else { | ||||
|                     products = _searchCache.Where(x => x.Title.Contains(query)).ToList(); | ||||
|                     foreach (Product prod in _searchCache.Where(x => x.Description.Contains(query)).ToList()) | ||||
|                     foreach (Product prod in _searchCache.Where(x => x.Description.Contains(query)).ToArray()) | ||||
|                         if (!products.Contains(prod)) | ||||
|                             products.Add(prod); | ||||
|                     foreach (Product prod in _searchCache.Where(x => x.Category.Contains(query)).ToList()) | ||||
|                     foreach (Product prod in _searchCache.Where(x => x.Category.Contains(query)).ToArray()) | ||||
|                         if (!products.Contains(prod)) | ||||
|                             products.Add(prod); | ||||
|                 } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user