score:13

Accepted answer

The problem has nothing to do with LINQ. LINQ is just an abstraction mechanism allowing you to query different datasources using the same syntax. If you are using MSSQL by default it will have SQL_Latin1_General_CP1_CI_AS collation which is case insensitive (Notice the CI in the name). So when your LINQ query gets translated to SQL (select * from Members where Name = 'BOB') and run it will return results. So basically you might need to change the collation of your SQL server database to one that is case sensitive if you want to perform case sensitive lookups with it.


Related Articles