Details
-
Improvement
-
Resolution: Duplicate
-
Major - P3
-
None
-
None
Description
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.
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'}}"); |
}
|
Attachments
Issue Links
- is duplicated by
-
CSHARP-4119 Review Compare, CompareTo and Equals uses of StringComparison, CultureInfo and ignoreCase
-
- Backlog
-