From fe0471eea4cf393c632297b821c4a5c351b17837 Mon Sep 17 00:00:00 2001 From: Steve Smith Date: Tue, 27 Nov 2018 10:11:41 -0500 Subject: [PATCH] Adding curly braces for if statements --- src/Infrastructure/Data/SpecificationEvaluator.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Infrastructure/Data/SpecificationEvaluator.cs b/src/Infrastructure/Data/SpecificationEvaluator.cs index 0372e48..111b44f 100644 --- a/src/Infrastructure/Data/SpecificationEvaluator.cs +++ b/src/Infrastructure/Data/SpecificationEvaluator.cs @@ -28,9 +28,13 @@ namespace Microsoft.eShopWeb.Infrastructure.Data // Apply ordering if expressions are set if (specification.OrderBy != null) + { query = query.OrderBy(specification.OrderBy); + } else if (specification.OrderByDescending != null) + { query = query.OrderByDescending(specification.OrderByDescending); + } // Apply paging if enabled if (specification.isPagingEnabled)