Avatar of TrialUser
TrialUserFlag 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
ASKER CERTIFIED SOLUTION
Avatar of wdosanjos
wdosanjos
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of TrialUser
TrialUser
Flag of Afghanistan image

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
Avatar of disrupt
disrupt
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
SOLUTION
Avatar of wdosanjos
wdosanjos
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Avatar of TrialUser
TrialUser
Flag of Afghanistan image

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
Avatar of wdosanjos
wdosanjos
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
SOLUTION
Avatar of disrupt
disrupt
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
ASP.NET
ASP.NET

The successor to Active Server Pages, ASP.NET websites utilize the .NET framework to produce dynamic, data and content-driven web applications and services. ASP.NET code can be written using any .NET supported language. As of 2009, ASP.NET can also apply the Model-View-Controller (MVC) pattern to web applications

128K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo