Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4112376
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T22:11:16+00:00 2026-05-20T22:11:16+00:00

Here is my problem. We’ve got a list of enterprises, users or anything and

  • 0

Here is my problem. We’ve got a list of enterprises, users or anything and we must search into it with a “StartsWith” search type. So on our site, we ain’t got a Search field such as a Textbox but we’ve got a search header including 27 buttons “#”, “A”, “B”, “C”, […] “Z”.

The problem we have is that if user click on “E” button, when we querying to get value from database, entreprises name may start with an “É”, “È”, “Ê”, bacause yes, our site is in french. Any idea of how to do it in LINQ.

This is important to know too that we’re using LLBLGen Pro. So I guess it need to have something he can convert into a valid SQL Query.

Here is what we’ve already tryied :

IList<Enterprise> enterprises;
switch (searchChar){
  [...]
  case "E":
     enterprises = from ent in ourContext.Enterprises
                   where "eèéêë".Any(param => ent.name[0] == param)
                   select ent;
     break;
  [...]
}

Which give us this error something relatively to a unconvertable query:
Unable to cast object of type 'System.Linq.Expressions.ConstantExpression' to type 'SD.LLBLGen.Pro.LinqSupportClasses.ExpressionClasses.SetExpression'.

So we’ve tried to make it basicaly with a simple LINQ query, without querying to DB to know if it’s possible.

IList<string> test = new List<string>() { "École", "enlever", "avoir" };
IList<string> result = (from value in test
                        where "eéèêë".Contains(value[0].ToString())
                        select value).ToList();

What is weird with this query, is that it ain’t crash. But, it ain’t work too! When debugging, it go throught it, but when we try to see what is into “result” list, it’s like if there’s nothing in it. I mean, the list is simply null. But nothing fail into the try catch!

Please help !

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T22:11:16+00:00Added an answer on May 20, 2026 at 10:11 pm

    The Any seem to be not working. Use Contains instead. This is workin.

    enterprises = from ent in ourContext.Enterprises
                  where "eèéêëEÈÉÊËE".Contains(ent.name[0])
                  select ent;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

here my problem, i'm using asp.net for my site, i get a list of
Got a problem here on exiting onclick. The program uses shared preferences to get
Here the problem. I have my site hosted on a shared hosting for asp.net
A curious problem here. I'm testing a site using IETester for Internet Explorer 8.
I got a problem here, when I used ajax to send a form it
Here is problem I'm trying to solve. It's for logistics company. I got all
I've got problem here which I couldn't solve by myself. Everything was okay before,
I have a problem here..... I have a List of ProcessStartInfo as List<ProcessStartInfo> I
I've got a problem here with an MSI deployment that I'm working on (using
The problem here is how to add an NSPopUpButton in Xcode 4's Interface Builder

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.