Update SearchController.cs
This commit is contained in:
parent
80375cda05
commit
902d7a15fd
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user