Browse Source

#881 msdemo: added default value for input.Sorting in ProductAppService GetListPagedAsync

pull/882/head
Bruno Bertechini 7 years ago
parent
commit
f875706c2b
  1. 2
      samples/MicroserviceDemo/modules/product/src/ProductManagement.Application/ProductManagement/ProductAppService.cs

2
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();

Loading…
Cancel
Save