database - Linq contains() -
I am implementing a search button that pulls all the products containing the word that a user can enter in a text box Will be recorded.
The keywords below can be given in any of the columns below. Var products = DB in x Products where x.SupplierId == Login user & amp; (X.States.testrestring). This includes (Search Certificates). X Splpler Code. Caitans (Search Serbia) || X Product Id. ToString () This includes (Search Serbia) || X Barcode Includes (Search Serratia) || X (Search Carter) X.ProposedActiveDate.ToString (). This includes (Search Serbia). X.VATRate.ToString (). Include (Search Certifa)) Select X;
The problem?
I did not find any product from the database (there is a product in the database).
What did I do wrong?
I think the order is wrong ...
If the user By typing shoes, shoes you need to split the search term "shoes" and "boot" and add them to a list & lt; & Gt; And then do the following
SearchTermsList.Contains (x.Status.ToString ()) || SearchTerm List. Resource (X Supplier Code)
Comments
Post a Comment