Explorar el Código

Fix OrderBy on Vouchers.

Andrew Klopper hace 8 años
padre
commit
4c3a14049f
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      BulkPrintingAPI/Controllers/VouchersController.cs

+ 2 - 1
BulkPrintingAPI/Controllers/VouchersController.cs

@@ -38,7 +38,8 @@ namespace BulkPrintingAPI.Controllers
38 38
             var credentials = await Utils.GetLoginCredentialsFromRequestAsync(HttpContext, _context);
39 39
             var result = await Page<Voucher>.GetPageAsync(
40 40
                 VouchersForBatchAndVendor(batchId, credentials.Vendor.Id)
41
-                    .OrderBy(v => new { v.BatchId, v.SequenceNumber }),
41
+                    .OrderBy(v => v.BatchId)
42
+                    .ThenBy(v => v.SequenceNumber),
42 43
                 page, pageSize);
43 44
 
44 45
             var now = DateTimeOffset.UtcNow;