public IEnumerable <Product> SearchPrice(decimal price) { using (var context = new VueSearchDataContext(_connectionString)) { return(context.Products.Where(p => p.UnitPrice == price).ToList()); } }
public IEnumerable <Product> SearchProductName(string searchTerm) { using (var context = new VueSearchDataContext(_connectionString)) { return(context.Products.Where(p => p.ProductName.Contains(searchTerm)).ToList()); } }