File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
Orm/Xtensive.Orm/Orm/Linq Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -209,8 +209,7 @@ protected override Expression VisitBinary(BinaryExpression binaryExpression)
209209 }
210210 // Following two checks for enums are here to improve result query
211211 // performance because they let not to cast columns to integer.
212- else if ( binaryExpression . NodeType . In ( ExpressionType . Equal , ExpressionType . NotEqual )
213- && binaryExpression . Left . StripCasts ( ) . Type . StripNullable ( ) . IsEnum
212+ else if ( binaryExpression . Left . StripCasts ( ) . Type . StripNullable ( ) . IsEnum
214213 && binaryExpression . Right . StripCasts ( ) . NodeType == ExpressionType . Constant ) {
215214 var rawEnum = binaryExpression . Left . StripCasts ( ) ;
216215
@@ -220,8 +219,7 @@ protected override Expression VisitBinary(BinaryExpression binaryExpression)
220219 left = Visit ( Expression . Convert ( rawEnum , typeToCast ) ) ;
221220 right = Visit ( Expression . Convert ( binaryExpression . Right , typeToCast ) ) ;
222221 }
223- else if ( binaryExpression . NodeType . In ( ExpressionType . Equal , ExpressionType . NotEqual )
224- && binaryExpression . Right . StripCasts ( ) . Type . StripNullable ( ) . IsEnum
222+ else if ( binaryExpression . Right . StripCasts ( ) . Type . StripNullable ( ) . IsEnum
225223 && binaryExpression . Left . StripCasts ( ) . NodeType == ExpressionType . Constant ) {
226224 var rawEnum = binaryExpression . Right . StripCasts ( ) ;
227225
You can’t perform that action at this time.
0 commit comments