From cda15178a31f124135cda820670da01b9fc9e34f Mon Sep 17 00:00:00 2001 From: Iliyan Iliev Date: Thu, 11 Jun 2020 13:34:45 +0300 Subject: [PATCH] order bought vouchers by decending --- .../Repositories/VouchersRepository.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/MAVN.Service.SmartVouchers.MsSqlRepositories/Repositories/VouchersRepository.cs b/src/MAVN.Service.SmartVouchers.MsSqlRepositories/Repositories/VouchersRepository.cs index 3844931..bb559e0 100644 --- a/src/MAVN.Service.SmartVouchers.MsSqlRepositories/Repositories/VouchersRepository.cs +++ b/src/MAVN.Service.SmartVouchers.MsSqlRepositories/Repositories/VouchersRepository.cs @@ -164,6 +164,7 @@ public async Task GetByOwnerIdAsync( var query = context.Vouchers.Where(v => v.OwnerId == ownerId); var result = await query + .OrderByDescending(x => x.PurchaseDate) .Skip(skip) .Take(take) .ToListAsync();