Case Insensitive String Search and Entity Framework

entity-framework linq

Question

I have a Entity Framework entity with a string Property named Description.
Searching for all entities where the Description contains a string is as simple as:

var res = from u ctx.Users where u.Description.contains(str) select u;

But suppose I want to support case insensitive search?

1
8
9/14/2011 11:04:15 AM

Accepted Answer

If you're using Linq to enties the search is done by the sql server so if the search is case sensitive or not depends on server settings.

12
9/14/2011 11:19:49 AM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow