Avatar of TrialUser
TrialUser
Flag for Afghanistan asked on

how to make LINQtosql ignore case on joins

I have a SQL Server 2008 database and I am connecting from ASP.net 4.0 application to the SQL Server db. I want LINQ to ignore case while doing Joins. Is there any setting either at the application level or at the datacontext level to make LINQ ignore Cases.  I do not want to use toupper in every query. please help thanks
ASP.NETC#Visual Basic.NET

Avatar of undefined
Last Comment
disrupt

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
wdosanjos

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
TrialUser

ASKER
When I run the SQL query in SQL Server management studio, SQL is not case sensitive when joining to varchar fields. However when I do it in Linq it is.
SOLUTION
disrupt

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
TrialUser

ASKER
Is LINQ to SQL query case senstive on joins as in If I do
Join soemtable on sometable.column1 equals sometable2.column2
where column1 and column2 are varchar(50 columns in sql server), would this match records

where column1 = Uname
column2 = uname

I am searching on the web and I am seeing some say LINQ is case senstive and some say it is now.
SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23