Skip to content

Commit 4585d5a

Browse files
committed
Optimization: avoid LINQ in ExpressionProcessor constructor
1 parent 79adf65 commit 4585d5a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Orm/Xtensive.Orm/Orm/Providers/Expressions/ExpressionProcessor.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -516,8 +516,12 @@ public ExpressionProcessor(LambdaExpression lambda,
516516

517517
if (lambda.Parameters.Count != sourceColumns.Length)
518518
throw Exceptions.InternalError(Strings.ExParametersCountIsNotSameAsSourceColumnListsCount, OrmLog.Instance);
519-
if (sourceColumns.Any(list => list.Any(c => c is null)))
520-
throw Exceptions.InternalError(Strings.ExSourceColumnListContainsNullValues, OrmLog.Instance);
519+
foreach (var list in sourceColumns) {
520+
foreach (var c in list) {
521+
if (c is null)
522+
throw Exceptions.InternalError(Strings.ExSourceColumnListContainsNullValues, OrmLog.Instance);
523+
}
524+
}
521525

522526
this.compiler = compiler; // This might be null, check before use!
523527
this.lambda = lambda;

0 commit comments

Comments
 (0)