String.Equals() not working as intended

前端 未结 6 735
再見小時候
再見小時候 2020-11-28 10:49

I am using LINQ to search through one of my Entity Framework tables and find a \"group\" based on the name. The name is a string and appears to be Unicode (says it is in the

6条回答
  •  情话喂你
    2020-11-28 11:39

    When using LINQ to Entities, it will automatically convert it to LINQ to SQL. And if the database field you are doing a .Equals on does not have a collate of NOCASE (SQLite in my example) then it will always be case-sensitive. In otherwords, the database defines how to do the string comparison rather than code.

提交回复
热议问题