Skip to content

Commit e85bdad

Browse files
committed
fixed netstandard
1 parent 3b45b82 commit e85bdad

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/GoatQuery/src/Evaluator/FilterEvaluator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,7 @@ private static Result<ConstantExpression> CreateStringOrEnumConstant(string valu
621621

622622
private static Result<ConstantExpression> ConvertStringToEnum(string value, Type actualType, Type targetType)
623623
{
624-
if (Enum.TryParse(actualType, value, ignoreCase: true, out var enumValue))
624+
if (Enum.TryParse(actualType, value, true, out var enumValue))
625625
{
626626
return Result.Ok(Expression.Constant(enumValue, targetType));
627627
}

src/GoatQuery/tests/Filter/FilterTest.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,11 @@ public static IEnumerable<object[]> Parameters()
376376
new[] { TestData.Users["User01"], TestData.Users["User05"] }
377377
};
378378

379+
yield return new object[] {
380+
"gender eq 'male'",
381+
new[] { TestData.Users["User01"], TestData.Users["User05"] }
382+
};
383+
379384
yield return new object[] {
380385
"gender eq 'Female'",
381386
new[] { TestData.Users["User02"] }

0 commit comments

Comments
 (0)