From f875706c2b605872cf3059bdf54a3d94f100efa8 Mon Sep 17 00:00:00 2001 From: Bruno Bertechini Date: Sat, 16 Mar 2019 09:01:22 -0300 Subject: [PATCH] #881 msdemo: added default value for input.Sorting in ProductAppService GetListPagedAsync --- .../ProductManagement/ProductAppService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/MicroserviceDemo/modules/product/src/ProductManagement.Application/ProductManagement/ProductAppService.cs b/samples/MicroserviceDemo/modules/product/src/ProductManagement.Application/ProductManagement/ProductAppService.cs index 25a596b24e..6cdf82f22a 100644 --- a/samples/MicroserviceDemo/modules/product/src/ProductManagement.Application/ProductManagement/ProductAppService.cs +++ b/samples/MicroserviceDemo/modules/product/src/ProductManagement.Application/ProductManagement/ProductAppService.cs @@ -28,7 +28,7 @@ namespace ProductManagement await NormalizeMaxResultCountAsync(input); var products = await _productRepository - .OrderBy(input.Sorting) + .OrderBy(input.Sorting ?? "Name") .Skip(input.SkipCount) .Take(input.MaxResultCount) .ToListAsync();