コード例 #1
0
 public List <Entity.Product> Search(string searchText)
 {
     try
     {
         if (!string.IsNullOrEmpty(searchText))
         {
             return(_context.Set <Entity.Product>().Where(BuildLikeExpression(searchText)).ToList());
         }
         else
         {
             return(_context.Products.ToList());
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }