c# - LINQ ; Search with culture invariant -



This is my problem. We've got a list of enterprises, users or anything else, and we've got it "Start" With "search type, so on our site, we did not find a text field like search fields, but we have got 27 buttons" # "," A "," B "," C ", [...] A search header with "Z"

The problem is that if we click on the 'e' button, the user can click on the query to get the value from the database, ENTREPRISES names together, "a ??", "a ??" Yes, our site is in French, any idea of ​​how to do this in LINQ

It is also important to know that we are using LLBLagen Pro. So I think it must be something that it can convert into a valid SQL query.

The effort we have made here is:

 IList & lt; Enterprise & gt; Enterprise; Switch (searchChar) {[...] case 'E':. Enterprises select ourContext.Enterprises where ENT = "EAA © êë in ENT = any (param = & gt; ent.name [0] == Ultimate) select ENT; break; [...]}  

Which give us some of this error for an unconvertable query relatively: type type of 'System.Linq.Expressions.ConstantExpression' to type Unable to do 'SD .LLBLGen.Pro.LinqSupportClasses.ExpressionClasses.SetExpression'.

We have tried to make it basically with a simple LINQ query, without having to know if it is possible to query for DB.

What's strange with this question is that it is not an accident, but it's not even work! While debugging, it boosts it, but when we look at the "results" list, it seems that there is nothing in it. I mean, the list is just empty but nothing in the attempt fails !

Please help!

The real solution here is to find a searchable name for your There is an additional column in the database, so whenever you add a new company, you add a value to the searchable name column. You can change all the characters in the upper (or less if you wish) and searchable names You can add a "clean" name to the column. You can also remove the punctuation at this point because Often searches are hurting

It will leave (and also very quickly) with a column you will never display, but it will be very easy to search for matches in this column as the form of You will never need to worry about the accented characters in search time.

Comments