-
Type: Improvement
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Linq
Hi, I from the nopCommerce team, and we want to add support MongoDB but really can't do it now because the Linq component has bugs, and it isn't flexible at all.
Predicate translator doesn't support string.Equals with StringComparison argument
I have some code for a pull request to fix the test below.
Unable to find source-code formatter for language: csharp. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
public void StringEqualsMethodWithStringComparisonArgument() { Assert( x => x.A.Equals("Awesome", StringComparison.InvariantCultureIgnoreCase), 1, "{A: /^Awesome$/i}"); Assert( x => !"Awesome".Equals(x.A, StringComparison.OrdinalIgnoreCase), 1, "{A: {$not: /^Awesome$/i}}"); Assert( x => "Awesome".Equals(x.A, StringComparison.Ordinal), 1, "{A: 'Awesome'}"); Assert( x => !x.A.Equals("Awesome", StringComparison.InvariantCulture), 1, "{A: {$ne: 'Awesome'}}"); }
- is duplicated by
-
CSHARP-4119 Review Compare, CompareTo and Equals uses of StringComparison, CultureInfo and ignoreCase
- Backlog