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