LINQ case sensitive

前端 未结 4 1984
挽巷
挽巷 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条回答
  •  囚心锁ツ
    2021-01-12 14:38

    Queryable.Contains has an overload taking an IEqualityComparer used for comparision. See msdn. If you supply a case insensitive comparer, this should work - I'm quite sure there is one in the framework already.

提交回复
热议问题