Open jgraygi opened 10 years ago
+1
Now taking pull requests! :smile_cat:
One thing to consider, which I recently ran into, is that case sensitivity is handled differently depending on whether you're using LINQ to objects, SQL, or entities. In the case of objects, strings will be compared and case will matter, but the database's collation will be used in the case of SQL and entities and case will not matter by default (see Differences between LINQ to Objects and LINQ to SQL queries). Trying to handle case sensitivity might be tricky, since you'd likely have to take into account what the expression is being applied to. For instance, we're using the helpers with LINQ to entities and it handles case-insensitive queries as expected.
I forked it and added the case insensitive and more https://github.com/mshtawythug/dlinq-helpers
This helper fulfills many of my needs but there is one small thing that needs to be addressed. You need to have the ability not to be case sensitive on the filters for "StartsWith", "EndsWith", and "Contains".