c# - How to search a varchar field, using LINQ, to build a list of recommendations -


I am trying to create a LINQ query with expression trees, for the following:

I is a field in my itemcode table called a label, an example of the data contained in this area is "lamp light chandelier".

I want to allow the user to type some text, i.e. "red lamps", and item code, label field label, where the text contains "red" or "lamp" Be able to

I am trying to recommend selection to the user, and this, while basic, is a good first step ... just need some help in composing the query.

I am using CSLA as my framework, here is an example of an existing code:

  IQueryable & LT; Data.ItemCode & gt; Query = ctx.DataContext.ItemCodes; // // ItemCodeId // if (criteria.Name! = Null) query = query Where (line = & gt; line.teamcodID.rdaccessor (criteriaContent ItemCodeId)); // // Name // if (criteria.name! = Null) query = query Where (line = & gt; line.name.Contains (criteria.Name)); Var data = query Select (line = & gt; itemcodfone.fetchmeetacindo (line)); This.AddRange (data);  

Thanks advance!

This can not be done.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -