Update InventoryController.cs
This commit is contained in:
parent
db4fc250b9
commit
81f32c630b
@ -79,7 +79,7 @@ public class InventoryController : Controller {
|
|||||||
if (order.Contains("Desc")) {
|
if (order.Contains("Desc")) {
|
||||||
if (!lastId.HasValue)
|
if (!lastId.HasValue)
|
||||||
lastId = _context.Products.Max(x => x.Id);
|
lastId = _context.Products.Max(x => x.Id);
|
||||||
ret = ret.Where(x => x.Id < lastId && x.Id > lastId - 5)
|
ret = ret.Where(x => x.Id < lastId && x.Id > lastId - 5);
|
||||||
} else {
|
} else {
|
||||||
if (!lastId.HasValue)
|
if (!lastId.HasValue)
|
||||||
lastId = 1;
|
lastId = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user