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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T05:04:09+00:00 2026-06-16T05:04:09+00:00

When I run this query in linqpad : Customer.Where(c => (c.CustomerName == test)) It

  • 0

When I run this query in linqpad:

Customer.Where(c => (c.CustomerName == "test"))

It returns a record that matches.

When I try running the same query in visual studio it does not return any matching records. This is the code I am using:

    List<Customer> customerList = new List<Customer>();

    using (DBEntities db = new DBEntities())
    {
        try
        {
            customerList = db.Customer.Where(c => (c.customerName == "test")).ToList();
        }
        catch (Exception ex)
        {
            MessageBox.Show(ex.ToString());
        }
    }

    return customerList;

Can anyone see why this it works in linqpad but does not work in visual studio?

  • 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-16T05:04:10+00:00Added an answer on June 16, 2026 at 5:04 am

    can you try out like this

    customerList = db.Customer.
       Where(c => String.Compare (c.customerName.ToUpper(),"test".ToUpper()) == 0).ToList();
    

    because there may be problem with the Casesensitive search for customer name.

    Try other variation of : String.Compare Method as per you need

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If I try to run this query in SQL Server 2005: SELECT 1 WHERE
I have a custom SQL query that I run with this line: @avg_score =
I'm trying to run this query: SELECT COUNT(events.event_id) AS total_events, COUNT(matches.fight_id) AS total_matches, COUNT(players.fighter_id)
When I try to run this query in Access through the ODBC interface into
I am trying to run this query: $record = Doctrine_Query::create() ->select('m.*') ->from('Modification m') ->leftJoin('m.Location
I run this query directly in phpmyadmin , it perfectly returns result !! but
If I run this query, does that give sysadmin rights to the database the
When I try and run this query on my database: $mysqli->query(UPDATE catalogsearch_fulltext SET data_index
If I run this query in Toad: SELECT BANDID, BANDNAME FROM WOODSTOCK WHERE BANDNAME
Hi I am trying to run this query in SQL but it is not

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.