开发者

Entity Framework and Case Insensitive String Search

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 t开发者_C百科o support case insensitive search?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜