aboutsummaryrefslogtreecommitdiff
path: root/RhSolutions.ProductSku/ProductExtensions.cs
blob: 3976581fa3cdd49dc43b6fe2f9545a1940fb5adb (plain)
1
2
3
4
5
6
7
8
9
namespace RhSolutions.Models;

public static class ProductExtensions
{
	public static IEnumerable<Product> FilterByName(this IEnumerable<Product> products, string[] searchKeys)
	{
		return products.Where(p => searchKeys.Any(k => p.Name.Contains(k)));
	}
}