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 9120077
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T05:32:54+00:00 2026-06-17T05:32:54+00:00

I use contains clause for searching in db table. But if the data has

  • 0

I use contains clause for searching in db table. But if the data has upper case letter and if I search with lower cases, it doesn’t find what I search. But it can find when I search with upper case letter. It is the same with lower case searches.

Here is my code:

 using (var context = new eTicaretEntity())
  {
    return context.GetActiveProducts().Where(p => p.Name.Contains(name)).ToList();
  }

And you can see what I mean is these pics.

It can find with upper case letter.

It can find

It couldn’t find data with lower case letter.
enter image description here

  • 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-06-17T05:32:55+00:00Added an answer on June 17, 2026 at 5:32 am

    If your database collation is case sensitive, then you’ll have to convert both sides of the comparison to upper (or lower) case.

    using (var context = new eTicaretEntity())
    {
        return context.GetActiveProducts()
                      .Where(p => p.Name.ToUpper().Contains(name.ToUpper()))
                      .ToList();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know LINQ doesn't have the SQL IN clause but rather uses contains. Can
I have a database table which is full-text indexed and i use the CONTAINS-function
I saw this similar question here but can't figure out how to use Contains
I was able to use where clause like the first one. But I get
How can I use contains and iexact Field lookups at the same query in
I'm trying to use the .Contains() function on a list of custom objects. This
My website contains : 1.FancyBox (for image overlay) 2.GalleryView (a slider) and both use
If I use a here document in a shell script that contains multiple backslashes
How can I use Membership.GeneratePassword to return a password that ONLY contains alpha or
How can I use JavaScript to determine if a UL contains 1 or more

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.