Skip to content

Commit 9384bc6

Browse files
committed
Check if the value is integral first
1 parent 41baf73 commit 9384bc6

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/Microsoft.OData.Client/ALinq/ExpressionWriter.cs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -561,13 +561,7 @@ internal override Expression VisitConstant(ConstantExpression c)
561561

562562
try
563563
{
564-
object currentValue = item;
565-
if (item.GetType().IsEnum)
566-
{
567-
currentValue = item.ToString();
568-
}
569-
570-
uriLiteral = LiteralFormatter.ForConstants.Format(currentValue);
564+
uriLiteral = LiteralFormatter.ForConstants.Format(item);
571565
}
572566
catch (InvalidOperationException)
573567
{

0 commit comments

Comments
 (0)