diff --git a/src/EFCore.Relational/Query/RelationalQueryTranslationPostprocessor.cs b/src/EFCore.Relational/Query/RelationalQueryTranslationPostprocessor.cs index 3fd24558073..bc1eed43392 100644 --- a/src/EFCore.Relational/Query/RelationalQueryTranslationPostprocessor.cs +++ b/src/EFCore.Relational/Query/RelationalQueryTranslationPostprocessor.cs @@ -36,6 +36,7 @@ public override Expression Process(Expression query) query = new SelectExpressionProjectionApplyingExpressionVisitor().Visit(query); query = new CollectionJoinApplyingExpressionVisitor().Visit(query); query = new TableAliasUniquifyingExpressionVisitor().Visit(query); + query = new NullComparisonTransformingExpressionVisitor().Visit(query); if (!UseRelationalNulls) { @@ -43,7 +44,6 @@ public override Expression Process(Expression query) } query = OptimizeSqlExpression(query); - query = new NullComparisonTransformingExpressionVisitor().Visit(query); return query; }