LINQ case sensitive

前端 未结 4 2013
挽巷
挽巷 2021-01-12 14:14

How to make LINQ case sensitive and NOT case sensitive depending on the situation?

I\'m using sql server 2008 and Entity Framework 4.0.

I changed the COLLATI

4条回答
  •  萌比男神i
    2021-01-12 14:31

    Read my reply to this:

    String.Equals() not working as intended

    It isn't the reply you wanted, probably :-)

    Ah... and if you have to convert to the same case to make comparisons, ToUpper is better than ToLower. Don't ask me why. But you can read here: Case insensitive string compare in LINQ-to-SQL

提交回复
热议问题